[New-bugs-announce] [issue30360] getpass.getpass() does not except stdin from an Expect script

brent saner report at bugs.python.org
Sun May 14 00:05:40 EDT 2017

New submission from brent saner:

This is reproducible on both 2.7.13 and 3.6.1.

Please refer to the attached files for demonstration. It seems that when I spawn a python script using getpass.getpass() from expect (http://expect.sourceforge.net/ - I'm using version 5.45), the input is not passed. Further, it seems interactive control is handed over to the shell- however, it doesn't actually pass anything to the python script that was spawned, forcing one to break out of the expect process itself.

Obviously, the proofs attached require the expect binary to be installed. To test, simply mark "poc.exp" as executable and execute it (assuming poc.py is in the same directory. If not, you'll need to edit line 4 of poc.exp).

components: Library (Lib)
files: expect-getpass.poc.tar
messages: 293630
nosy: brent saner
priority: normal
severity: normal
status: open
title: getpass.getpass() does not except stdin from an Expect script
Added file: http://bugs.python.org/file46861/expect-getpass.poc.tar

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list