Idan Kamara added the comment:
Unfortunately parse_known_args is buggy too: http://bugs.python.org/issue16142
--
___
Python tracker
<http://bugs.python.org/issue14
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
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
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
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
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
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
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
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