How to keep Console area fixed for a thread

Dave Angel d at davea.name
Sat Nov 26 21:20:01 EST 2011


On 11/25/2011 01:00 PM, Nikunj Badjatya wrote:
> Can anyone throw some light on this please ! ?
>
>
>
( when you top-post, you confuse things.   comp.lang.python follows the 
usual convention of putting new material after the parts you're 
quoting.  Further, trying to embed images inside html messages will mess 
up all of us who use text readers to read a text forum. )
> On Thu, Nov 24, 2011 at 9:05 PM,<Nikunj.Badjatya at emc.com>  wrote:
>
>> Hi All,****
>>
>> ** **
>>
>> Please look at the code below.****
>>
>> I am using pypi progressbar. But in general, How can I keep the area of
>> the console fixed for  the thread to print its status on it.****
>>
No idea what you're really asking.  But I'll take a wild guess.

Perhaps you're trying to divvy up a console box, and have different 
parts of it updated by different threads.  In the general case, it can't 
be done.  But if you are going to make it work, you'll need to restrict 
the environment some.  Perhaps if you reword the question, with more 
information, someone can help.

What operating system and what Python version will this have to run on?  
On Unix/Linux, you have curses that can be used at least to print 
without scrolling.  On Windows, you may have something similar, by using 
ANSI sequences, but it's been so long since I tried that I have no 
idea.  But if you just use print from different threads, the characters  
may be intermingled.


-- 

DaveA




More information about the Python-list mailing list