print without newline?

Mikael Olofsson mikael at isy.liu.se
Wed Aug 30 05:35:38 EDT 2000


On 30-Aug-00 noahspurrier at my-deja.com wrote:
 >  So I've been doing this:
 >          sys.stdout.write ("Hello.")
 >  but this seems ugly, plus I have to import sys.

I guess it's the way to go. I wouldn't mind importing sys, I do that 
all the time anyway. If you want to spare yourself some writing, you 
can bind sys.stdout.write to a new name:

mywrite=sys.stdout.write

and then use mywrite.

/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael               
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    30-Aug-00
Time:    11:30:37

         /"\
         \ /     ASCII Ribbon Campaign
          X      Against HTML Mail
         / \

This message was sent by XF-Mail.
-----------------------------------------------------------------------



More information about the Python-list mailing list