remove duplicated imports (closes #25502)
This commit is contained in:
parent
f8152c67f5
commit
669ff66c32
|
@ -99,7 +99,7 @@ def win_getpass(prompt='Password: ', stream=None):
|
||||||
"""Prompt for password with echo off, using Windows getch()."""
|
"""Prompt for password with echo off, using Windows getch()."""
|
||||||
if sys.stdin is not sys.__stdin__:
|
if sys.stdin is not sys.__stdin__:
|
||||||
return fallback_getpass(prompt, stream)
|
return fallback_getpass(prompt, stream)
|
||||||
import msvcrt
|
|
||||||
for c in prompt:
|
for c in prompt:
|
||||||
msvcrt.putwch(c)
|
msvcrt.putwch(c)
|
||||||
pw = ""
|
pw = ""
|
||||||
|
|
|
@ -2793,7 +2793,7 @@ def _test():
|
||||||
return doctest.testmod()
|
return doctest.testmod()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys, argparse
|
import argparse
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='disassemble one or more pickle files')
|
description='disassemble one or more pickle files')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|
|
@ -1080,8 +1080,6 @@ class LMTP(SMTP):
|
||||||
# Test the sendmail method, which tests most of the others.
|
# Test the sendmail method, which tests most of the others.
|
||||||
# Note: This always sends to localhost.
|
# Note: This always sends to localhost.
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
|
||||||
|
|
||||||
def prompt(prompt):
|
def prompt(prompt):
|
||||||
sys.stdout.write(prompt + ": ")
|
sys.stdout.write(prompt + ": ")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
|
@ -18,8 +18,6 @@ except:
|
||||||
a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
|
a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
for dir in sys.path:
|
for dir in sys.path:
|
||||||
file = os.path.join(dir, "os.py")
|
file = os.path.join(dir, "os.py")
|
||||||
if os.path.isfile(file):
|
if os.path.isfile(file):
|
||||||
|
|
|
@ -1289,7 +1289,6 @@ def main(srcfile, dump_module=False):
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
INC_DIR = ''
|
INC_DIR = ''
|
||||||
|
|
Loading…
Reference in New Issue