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
foobar
foobar
^----------- 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 still confused - just on a higher level now.
~
~
".signature" [Modified] 1 line --100%-- 1,48 All