Message6712
Actually the problem is not getpass itself, but sys.stdin.readline.
If you type this in a jython prompt it will hang the same way:
import sys; sys.stdin.readline()
Digging a bit further it seems there are some bugs in TextIOWrapper.read(). It looks for '\r' and '\n' characters but it appears that reading from the console through that underlying readahead buffer gives different characters for Enter (returns CR instead of LF), EOF (ctrl-Z, returns char code 26), and it even swallows CTRL-C as a 'normal' character with code 3 (ETX) and CTRL-D as 4 (EOT). This screws up the handling of the characters and the loop never exits.
I don't have any experience with java nio to tell what's going on here. |
|
Date |
User |
Action |
Args |
2011-11-06 23:27:26 | irmen | set | messageid: <1320622046.55.0.111642636543.issue1787@psf.upfronthosting.co.za> |
2011-11-06 23:27:26 | irmen | set | recipients:
+ irmen, jackgene, samwyse |
2011-11-06 23:27:26 | irmen | link | issue1787 messages |
2011-11-06 23:27:26 | irmen | create | |
|