I am, unfortunately, using Windows 7 and am running GNU Emacs 25.3.1 (x86_64-w64-mingw32) of 2017-09-26
. Everything functions as expected from the command line. However, within Emacs, I encounter a problem.
I have started Emacs using -q
. I start an interactive Python session with M-x run-python
. Regular input works fine. However, when I try to use getpass
, no input is accepted and all text is printed to the screen. Pressing Enter
only inserts a new line. To demonstrate:
Text transcript of Emacs input:
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup failed
>>> user = input('Username: ')
Username: bob
>>> import getpass
>>> pw = getpass.getpass('Password: ')
my secret password
wait, why is it printing to screen?
and why does pressing return only insert a new line?
I can't seem to get out of this!
I'm going to press C-c C-c now C-c C-c C-c C-cTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\Users\AppData\Local\Continuum\anaconda3\lib\getpass.py", line 110, in win_getpass
raise KeyboardInterrupt
KeyboardInterrupt
>>> File "<stdin>", line 1
my secret password
^
SyntaxError: invalid syntax
>>> File "<stdin>", line 1
wait, why is it printing to screen?
^
SyntaxError: invalid syntax
>>> File "<stdin>", line 1
and why does pressing return only insert a new line?
^
SyntaxError: invalid syntax
>>> File "<stdin>", line 1
I can't seem to get out of this!
^
SyntaxError: invalid syntax
>>>
I'm not sure what to do next in fixing this.
- Does anyone else have this issue?
- If so, might it be a problem with
python.el
and a bug report need to be submitted? And where would that bug be reported? - Any ideas or suggestions?