diff --git a/Mac/Tools/IDE/PyConsole.py b/Mac/Tools/IDE/PyConsole.py index fb8b439a694..ea2cf834fb6 100644 --- a/Mac/Tools/IDE/PyConsole.py +++ b/Mac/Tools/IDE/PyConsole.py @@ -340,8 +340,15 @@ class SimpleStdin: def readline(self): import EasyDialogs + # A trick to make the input dialog box a bit more palatable + if hasattr(sys.stdout, '_buf'): + prompt = sys.stdout._buf + else: + prompt = "" + if not prompt: + prompt = "Stdin input:" sys.stdout.flush() - rv = EasyDialogs.AskString("") + rv = EasyDialogs.AskString(prompt) if rv is None: return "" return rv + '\n'