diff options
| author | Ask Solem <ask@celeryproject.org> | 2013-09-10 17:26:12 +0100 |
|---|---|---|
| committer | Ask Solem <ask@celeryproject.org> | 2013-09-10 17:26:12 +0100 |
| commit | 554bddd2af198680b6e2ea5a4aa3448850e04c07 (patch) | |
| tree | c7bc069e196dc90aedf1bff31d8d1286f790b8da /docs/_ext | |
| parent | 2ff6f89c48143ae9101df91fe58cc61375aaca0b (diff) | |
| download | kombu-554bddd2af198680b6e2ea5a4aa3448850e04c07.tar.gz | |
Py3 fixes
Diffstat (limited to 'docs/_ext')
| -rw-r--r-- | docs/_ext/literals_to_xrefs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/_ext/literals_to_xrefs.py b/docs/_ext/literals_to_xrefs.py index f1497565..d01a4227 100644 --- a/docs/_ext/literals_to_xrefs.py +++ b/docs/_ext/literals_to_xrefs.py @@ -7,6 +7,11 @@ import re import sys import shelve +try: + input = input +except NameError: + input = raw_input # noqa + refre = re.compile(r'``([^`\s]+?)``') ROLES = ( @@ -76,7 +81,7 @@ def fixliterals(fname): replace_type = None while replace_type is None: - replace_type = raw_input( + replace_type = input( colorize("Replace role: ", fg="yellow")).strip().lower() if replace_type and replace_type not in ROLES: replace_type = None @@ -94,7 +99,7 @@ def fixliterals(fname): if default.endswith("()") and \ replace_type in ("class", "func", "meth"): default = default[:-2] - replace_value = raw_input( + replace_value = input( colorize("Text <target> [", fg="yellow") + default + colorize("]: ", fg="yellow"), |
