Files
openide/python/helpers/pycharm/fix_getpass.py
T
Dmitry Cheryasov 715aeae280 Initial and incomplete Django+Buildout support: server (+debugger) only.
Consoles still lack buildout support.
PythonCommandLineState and patchers refactored.
2010-08-23 10:14:58 +03:00

13 lines
453 B
Python

# on win32, redefines getpass from too clandestine to more explicit
import sys
def fixGetpass():
if sys.platform == 'win32':
import getpass
import warnings
fallback = getattr(getpass, 'fallback_getpass', None) # >= 2.6
if not fallback:
fallback = getpass.default_getpass # <= 2.5
getpass.getpass = getpass.fallback_getpass
warnings.simplefilter("ignore", category=getpass.GetPassWarning)