[issue14174] argparse.REMAINDER fails to parse remainder correctly

2012-10-06 Thread Idan Kamara
Idan Kamara added the comment: Unfortunately parse_known_args is buggy too: http://bugs.python.org/issue16142 -- ___ Python tracker <http://bugs.python.org/issue14

[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-05 Thread Idan Kamara
Idan Kamara added the comment: Yes that'd fix the known option before unknown but not the other way around. -- ___ Python tracker <http://bugs.python.org/is

[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-05 Thread Idan Kamara
New submission from Idan Kamara: When known and unknown options are given together in the same option string (e.g. -xy) then ArgumentParser behaves in a strange way: - if the known option is given first (so -k is known and the parser is fed with ['-ku']) then the parsing aborts w

[issue14174] argparse.REMAINDER fails to parse remainder correctly

2012-09-21 Thread Idan Kamara
Idan Kamara added the comment: I just ran into this issue myself and worked around it by using parse_known_args*. * http://docs.python.org/library/argparse.html#partial-parsing -- nosy: +idank ___ Python tracker <http://bugs.python.org/issue14

[issue12833] raw_input misbehaves when readline is imported

2011-08-27 Thread Idan Kamara
Idan Kamara added the comment: You're right, as this little C program verifies: #include #include #include int main() { printf("foo "); char* buf = readline(""); free(buf); return 0; } Passing ' ' seems to be a suitable workaround for thos

[issue12833] raw_input misbehaves when readline is imported

2011-08-26 Thread Idan Kamara
Idan Kamara added the comment: Reproduced on 2.7. (flushing stdin/out doesn't help) -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/is

[issue12833] raw_input misbehaves when readline is imported

2011-08-24 Thread Idan Kamara
New submission from Idan Kamara : import sys, readline sys.stdout.write('foo ') raw_input() When trying the above on Debian, 2.6.6 using gnome-terminal, typing a character then hitting backspace deletes "foo " as well. I'm not sure if this is a bug or the expected

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-20 Thread Idan Kamara
Idan Kamara added the comment: Thanks for getting on top of this so quickly Charles. Setting close_fds=True worked like a charm. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Idan Kamara
New submission from Idan Kamara : The following program hangs on Debian, Python 2.6.6: import subprocess proc1 = subprocess.Popen(['cat'], stdin=subprocess.PIPE) proc2 = subprocess.Popen(['cat'], stdin=subprocess.PIPE) proc1.stdin.close() proc1.wait() Changing the last