C
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 "foobar" it looks like this:
../test.py
^----------- where does this space come from?
I wonder where the space comes from in the line where I print what the
user typed. Does it have to do with the "," after the print which I use
to suppress the newline? Any ideas?
Regards
Christoph
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 "foobar" it looks like this:
../test.py
foobarfoobar
^----------- where does this space come from?
I wonder where the space comes from in the line where I print what the
user typed. Does it have to do with the "," after the print which I use
to suppress the newline? Any ideas?
Regards
Christoph