Re: raw_input(), STRANGE behaviour

2008-01-28 Thread Dox33
YES! This is what I was looking for. Great! All works fine now. Thank you very much Gabriel. Gabriel Genellina schreef: > Add this on your sitecustomize.py module (or create one) > > import sys > def raw_input(prompt=None): >if prompt: sys.stdout.write(prompt) >return original_raw_input()

Re: raw_input(), STRANGE behaviour

2008-01-27 Thread sevenbark
On Sat, 26 Jan 2008 04:23:36 -0800 (PST), Dox33 <[EMAIL PROTECTED]> wrote: >WHERE IS THE SECOND LINE? >It is in the file stderr_catch.txt!!! > > See the problem? >Please Tell me? Why is the prompt produced by raw_input() printed to >the error channel? It should be stdout, just as the print s

Re: raw_input(), STRANGE behaviour

2008-01-27 Thread Gabriel Genellina
En Sun, 27 Jan 2008 12:51:51 -0200, Dox33 <[EMAIL PROTECTED]> escribi�: > Yes, I know. > There are several ways to work around the problem. > (Look at the innitial code I provided in this discussion start) > Fact is, every time I'm getting a script from somewhere or someone, I > have to search a

Re: raw_input(), STRANGE behaviour

2008-01-27 Thread Dox33
Yes, I know. There are several ways to work around the problem. (Look at the innitial code I provided in this discussion start) Fact is, every time I'm getting a script from somewhere or someone, I have to search and replace all the affected code. Not very conveniant. That's why I rather would have

Re: raw_input(), STRANGE behaviour

2008-01-26 Thread Hrvoje Niksic
Dox33 <[EMAIL PROTECTED]> writes: > Thanks for your reply. Since I momentarily do not have the ability > to build a new python executable, I would like to ask for your help > in this case. Are you able to supply me with a corrected version? You can simply choose not to use raw_input, and use sy

Re: raw_input(), STRANGE behaviour

2008-01-26 Thread Terry Reedy
I believe a workaround to the bug of raw_input sending the prompt to stderr is print 'prompt:', a = raw_input() Not nice, but possibly better that waiting for a corrected binary. -- http://mail.python.org/mailman/listinfo/python-list

Re: raw_input(), STRANGE behaviour

2008-01-26 Thread Dox33
Hello Mike, Thanks for your reply. Since I momentarily do not have the ability to build a new python executable, I would like to ask for your help in this case. Are you able to supply me with a corrected version? Friendly greetings Rens Duijsens On 26 jan, 16:50, Mike Kent <[EMAIL PROTECTED]> w

Re: raw_input(), STRANGE behaviour

2008-01-26 Thread Mike Kent
On Jan 26, 7:23 am, Dox33 <[EMAIL PROTECTED]> wrote: > I ran into a very strange behaviour of raw_input(). > I hope somebody can tell me how to fix this. ===CUT=== > *** Thirst, redirect stderr to file, STRANGE behaviour.. > From the command prompt I run: > python script.py 2> stderr_catch.txt

raw_input(), STRANGE behaviour

2008-01-26 Thread Dox33
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples. (Sorry, long email) The first two examples are behaving normal, the thirth is strange... I wrote the fo