summaryrefslogtreecommitdiffstats
path: root/Lib/getpass.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/getpass.py')
-rw-r--r--Lib/getpass.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 66b1aee..952e023 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -15,6 +15,8 @@ def getpass(prompt='Password: '):
On Windows, this calls win_getpass(prompt) which uses the
msvcrt module to get the same effect.
+
+ On the Mac EasyDialogs.AskPassword is used, if available.
"""
@@ -29,7 +31,12 @@ def getpass(prompt='Password: '):
try:
import msvcrt
except ImportError:
- return default_getpass(prompt)
+ try:
+ from EasyDialogs import AskPassword
+ except ImportError:
+ return default_getpass(prompt)
+ else:
+ return AskPassword(prompt)
else:
return win_getpass(prompt)