how do i keep python from printing a newline when it exits the program?
Peter Otten
__peter__ at web.de
Mon Oct 11 11:35:19 EDT 2004
More information about the Python-list mailing list
Mon Oct 11 11:35:19 EDT 2004
- Previous message (by thread): how do i keep python from printing a newline when it exits the program?
- Next message (by thread): how do i keep python from printing a newline when it exits the program?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
xegfault wrote: > print "No newline, please.", > # End of script > > When the program runs, python is still printing a newline when the > program exits. How does one keep python from doing so? Use sys.stdout.write() instead of print or clear the softspace flag sys.stdout.softspace = False after the print statement. Google 'site:mail.python.org exit newline' for some background. Peter
- Previous message (by thread): how do i keep python from printing a newline when it exits the program?
- Next message (by thread): how do i keep python from printing a newline when it exits the program?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list