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()
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
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
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
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
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
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
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
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