Re: Printing and prompting adds a mysterious extra space

2005-10-01 Thread Christoph Haas
On Sat, Oct 01, 2005 at 05:09:48PM -0500, [EMAIL PROTECTED] wrote: > Use sys.stdout.write instead of print. It will solve these problems you are > having. > > If you really want to know what's going on, read the language manual, > http://docs.python.org/ref/print.html It explains the behavior of

Re: Printing and prompting adds a mysterious extra space

2005-10-01 Thread jepler
Use sys.stdout.write instead of print. It will solve these problems you are having. If you really want to know what's going on, read the language manual, http://docs.python.org/ref/print.html It explains the behavior of this extra space, which is output by a successive 'print' statement. The imp

Re: Printing and prompting adds a mysterious extra space

2005-10-01 Thread Christoph Haas
On Sat, Oct 01, 2005 at 01:17:41PM -0700, [EMAIL PROTECTED] wrote: > Christoph Haas wrote: > > I'm writing a simple interactive program to maintain a database. > > The goal was to print "> " at the beginning of the line, wait for > > user input and then deal with it. Minimal test program: > > > > i

Re: Printing and prompting adds a mysterious extra space

2005-10-01 Thread [EMAIL PROTECTED]
Christoph Haas wrote: > Evening... > > I'm writing a simple interactive program to maintain a database. > The goal was to print "> " at the beginning of the line, wait for > user input and then deal with it. Minimal test program: > > import sys; print ">", ; print sys.stdin.readline() > > However

Printing and prompting adds a mysterious extra space

2005-10-01 Thread Christoph Haas
Evening... I'm writing a simple interactive program to maintain a database. The goal was to print "> " at the beginning of the line, wait for user input and then deal with it. Minimal test program: import sys; print ">", ; print sys.stdin.readline() However when I run the program and enter "foob