diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 06:49:51 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 06:49:51 (GMT) |
commit | ce96f69d69a6020c780145c89a17a8391b63624b (patch) | |
tree | 7325a9bfaddf191e49910532df1fa4210c335196 /Tools | |
parent | 9e2b9665ae9f94a07da54156c48e2cd411a23746 (diff) | |
download | cpython-ce96f69d69a6020c780145c89a17a8391b63624b.zip cpython-ce96f69d69a6020c780145c89a17a8391b63624b.tar.gz cpython-ce96f69d69a6020c780145c89a17a8391b63624b.tar.bz2 |
Get rid of a bunch more raw_input references
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/compiler/regrtest.py | 5 | ||||
-rwxr-xr-x | Tools/scripts/ftpmirror.py | 5 | ||||
-rwxr-xr-x | Tools/scripts/treesync.py | 5 | ||||
-rwxr-xr-x | Tools/scripts/xxci.py | 5 | ||||
-rw-r--r-- | Tools/webchecker/wcmac.py | 4 |
5 files changed, 23 insertions, 1 deletions
diff --git a/Tools/compiler/regrtest.py b/Tools/compiler/regrtest.py index 50d06e7..4244d62 100644 --- a/Tools/compiler/regrtest.py +++ b/Tools/compiler/regrtest.py @@ -67,6 +67,11 @@ def run_regrtest(lib_dir): def cleanup(dir): os.system("rm -rf %s" % dir) +def raw_input(prompt): + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + def main(): lib_dir = copy_library() compile_files(lib_dir) diff --git a/Tools/scripts/ftpmirror.py b/Tools/scripts/ftpmirror.py index 0f918b8..caade16 100755 --- a/Tools/scripts/ftpmirror.py +++ b/Tools/scripts/ftpmirror.py @@ -352,6 +352,11 @@ class LoggingFile: def close(self): self.outfp.write('\n') +def raw_input(prompt): + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + # Ask permission to download a file. def askabout(filetype, filename, pwd): prompt = 'Retrieve %s %s from %s ? [ny] ' % (filetype, filename, pwd) diff --git a/Tools/scripts/treesync.py b/Tools/scripts/treesync.py index ab9324b..4fb1798 100755 --- a/Tools/scripts/treesync.py +++ b/Tools/scripts/treesync.py @@ -187,6 +187,11 @@ def copy(src, dst, rmode="rb", wmode="wb", answer='ask'): f.close() g.close() +def raw_input(prompt): + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + def okay(prompt, answer='ask'): answer = answer.strip().lower() if not answer or answer[0] not in 'ny': diff --git a/Tools/scripts/xxci.py b/Tools/scripts/xxci.py index c6a7d08..1e77c87 100755 --- a/Tools/scripts/xxci.py +++ b/Tools/scripts/xxci.py @@ -105,6 +105,11 @@ def showdiffs(file): cmd = 'rcsdiff ' + file + ' 2>&1 | ${PAGER-more}' sts = os.system(cmd) +def raw_input(prompt): + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + def askyesno(prompt): s = raw_input(prompt) return s in ['y', 'yes'] diff --git a/Tools/webchecker/wcmac.py b/Tools/webchecker/wcmac.py index 9c8a199..9edcd5d 100644 --- a/Tools/webchecker/wcmac.py +++ b/Tools/webchecker/wcmac.py @@ -4,4 +4,6 @@ webchecker.MAXPAGE = 50000 webchecker.verbose = 2 sys.argv.append('-x') webchecker.main() -raw_input("\nCR to exit: ") +sys.stdout.write("\nCR to exit: ") +sys.stdout.flush() +sys.stdin.readline() |