Message128754
In python 2.5, entering ^C in a getpass prompt yields a KeyboardInterrupt. In later versions, nothing happens, and '\x03' is returned after pressing return.
In python 2.5, entering ^Z in a getpass prompt suspends the process. In later versions, nothing happens, and '\x1a' is returned after pressing return.
Pressing ctrl-C or ctrl-Z multiple times returns '\x03'/'\x1a' multiple times.
Tested versions:
Python 2.5.4 (r254:67916, Jan 20 2010, 21:44:03) [GCC 4.3.3] on linux2 (OK)
getpass.py is http://svn.python.org/view/python/trunk/Lib/getpass.py?revision=43495&view=markup
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 (BAD)
getpass.py is r76000 with the following diff:
54c54
< except (AttributeError, ValueError):
---
> except:
(so it doesn't implement r74860)
Python 2.7.1 (r271:86832, Jan 4 2011, 13:57:14) [GCC 4.5.2] on sunos5 (BAD)
Python 3.1.2 (r312:79147, Sep 27 2010, 09:45:41) [GCC 4.4.3] on linux2 (BAD)
Python 3.1.3 (r313:86834, Dec 1 2010, 20:16:39) [GCC 4.5.1] on sunos5 (BAD)
Steps to reproduce:
1) import getpass
2) getpass.getpass('-> ')
3) press ctrl-C or ctrl-Z
- nothing happens
4) press return
- '\x03'/'\x1a' is returned |
|
Date |
User |
Action |
Args |
2011-02-17 20:56:28 | valhallasw | set | recipients:
+ valhallasw |
2011-02-17 20:56:28 | valhallasw | set | messageid: <1297976188.87.0.766078134711.issue11236@psf.upfronthosting.co.za> |
2011-02-17 20:56:28 | valhallasw | link | issue11236 messages |
2011-02-17 20:56:28 | valhallasw | create | |
|