diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-29 06:19:44 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-29 06:19:44 (GMT) |
| commit | b2874bc585e7ec54d3c2bd2cc52108d048c33a3c (patch) | |
| tree | 138ee93dc9b70d7ec090b89369b529cb0b9f190a | |
| parent | 6230235e833bedfc1b4b6c1aba1d6fa8b616d1b1 (diff) | |
| parent | 860c8a404ae540e5db076b2ca9b0605c30728dd9 (diff) | |
| download | cpython-b2874bc585e7ec54d3c2bd2cc52108d048c33a3c.zip cpython-b2874bc585e7ec54d3c2bd2cc52108d048c33a3c.tar.gz cpython-b2874bc585e7ec54d3c2bd2cc52108d048c33a3c.tar.bz2 | |
Merge heads
| -rw-r--r-- | Lib/getpass.py | 2 | ||||
| -rw-r--r-- | Lib/pickletools.py | 2 | ||||
| -rwxr-xr-x | Lib/smtplib.py | 2 | ||||
| -rw-r--r-- | PC/testpy.py | 2 | ||||
| -rw-r--r-- | Parser/asdl_c.py | 1 |
5 files changed, 2 insertions, 7 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py index 7c4e976..be51121 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -99,7 +99,7 @@ def win_getpass(prompt='Password: ', stream=None): """Prompt for password with echo off, using Windows getch().""" if sys.stdin is not sys.__stdin__: return fallback_getpass(prompt, stream) - import msvcrt + for c in prompt: msvcrt.putwch(c) pw = "" diff --git a/Lib/pickletools.py b/Lib/pickletools.py index 43dedb3..1c77336 100644 --- a/Lib/pickletools.py +++ b/Lib/pickletools.py @@ -2794,7 +2794,7 @@ def _test(): return doctest.testmod() if __name__ == "__main__": - import sys, argparse + import argparse parser = argparse.ArgumentParser( description='disassemble one or more pickle files') parser.add_argument( diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 4fe6aaf..7e34875 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -1080,8 +1080,6 @@ class LMTP(SMTP): # Test the sendmail method, which tests most of the others. # Note: This always sends to localhost. if __name__ == '__main__': - import sys - def prompt(prompt): sys.stdout.write(prompt + ": ") sys.stdout.flush() diff --git a/PC/testpy.py b/PC/testpy.py index 36f9200..4ef3d4f 100644 --- a/PC/testpy.py +++ b/PC/testpy.py @@ -18,8 +18,6 @@ except: a PC, you should add the dos_8x3 directory to your PYTHONPATH.""") sys.exit(1) -import os - for dir in sys.path: file = os.path.join(dir, "os.py") if os.path.isfile(file): diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index d597122..3128078 100644 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1289,7 +1289,6 @@ def main(srcfile, dump_module=False): f.close() if __name__ == "__main__": - import sys import getopt INC_DIR = '' |
