print with no newline
Jp Calderone
exarkun at divmod.com
Fri Sep 3 10:08:08 EDT 2004
More information about the Python-list mailing list
Fri Sep 3 10:08:08 EDT 2004
- Previous message (by thread): print with no newline
- Next message (by thread): print with no newline
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Paul Watson wrote: > I thought that using a comma at the end of a print statement would suppress > printing of a newline. Am I misunderstanding this feature? How can I use > print and not have a newline appended at the end? > Print doesn't want to leave the *final* line without a newline. sys.stdout.write() doesn't care if your shell prompt gets mixed in with the last line of output. You'll need to use the latter if that's what you want. exarkun at boson:~$ python -c "import sys; sys.stdout.write('here')" hereexarkun at boson:~$ Jp
- Previous message (by thread): print with no newline
- Next message (by thread): print with no newline
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list