Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: How to I print without newline ?

Reply
Thread Tools

RE: How to I print without newline ?

 
 
David Stockwell
Guest
Posts: n/a
 
      05-27-2004


>>>def try1(text):

.... x = "\r%s" % text
.... print x,
....
>>>def series():

.... try1("10")
.... try1("999")
....
>>>series()

999

Seems to work to put the \r first



>From: "David Stockwell" <>
>To: , python-
>Subject: RE: How to I print without newline ?
>Date: Thu, 27 May 2004 15:22:05 +0000
>
>Hi,
>
>This might work:
>
>print "25\r",
>
>the \r would do a carriage return with no line feed.
>the , would try to keep it on the same line.
>
>not sure though.
>
>
>David Stockwell
>-------
>Cell: http://cellphone.duneram.com/index.html
>Cam: http://www.duneram.com/cam/index.html
>Tax: http://www.duneram.com/index.html
>
>
>
>
>>From: "" <>
>>To: python-
>>Subject: How to I print without newline ?
>>Date: Thu, 27 May 2004 17:06:17 +0200
>>
>>Hi !
>>
>>I want to print, but without newline. I want to create a progress for ftp,
>>but the print is drop a newline for every percent.
>>I want like this:
>>
>>0% 25% 50% 75% 100%
>>
>>But this happening:
>>0%
>>25%
>>50%
>>75%
>>100%
>>
>>How to I prevent the newlines ?
>>
>>Thanx for help:
>>FT
>>
>>
>>--
>>http://mail.python.org/mailman/listinfo/python-list

>
>_________________________________________________ ________________
>MSN Toolbar provides one-click access to Hotmail from any Web page – FREE
>download! http://toolbar.msn.click-url.com/go/...ave/direct/01/
>
>
>--
>http://mail.python.org/mailman/listinfo/python-list


__________________________________________________ _______________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN
Premium! http://join.msn.click-url.com/go/onm...ave/direct/01/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
print without newline "halts" program execution Karlo Lozovina Python 2 04-16-2006 01:45 AM
How to I print without newline ? fowlertrainer@anonym.hu Python 4 05-28-2004 02:24 PM
Re: How to I print without newline ? Ray Cote Python 1 05-27-2004 05:05 PM
Print always puts newline (or adds a space) Tobiah Python 5 09-16-2003 07:43 PM



Advertisments