On 25 Nov 2006 15:27:26 -0800, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote: > Hi, > > I have, for very long, been trying to find a consistent solution (which > could work across major python platforms - Linux, Windows, Mac OS X) > for the following problem. > > I have a function which downloads files from the web. I've made the > function threaded. I'm trying to implement a progress bar for it which > could work across all the platforms. > > The problem is that when the progress bar is displayed, all the threads > overwrite the progress bar. > > I've thought of using curses but AFAIK curses is not available for > Windows. > > Is there a generic way to accomplish the following: > > progress = "[===================]\n[=======================]" > for x in range(5): > sys.stdout.write(progress + "\r") > > Basically, I want a way through which I want to display data on two > lines and make sure that "\r" overwrites the two lines without putting > a newline making sure that whatever library it uses is available across > all major Python platforms. > > Thanks, > Ritesh > > -- > http://mail.python.org/mailman/listinfo/python-list >
Take a look at this: http://cheeseshop.python.org/pypi/progressbar -- Read my blog! I depend on your acceptance of my opinion! I am interesting! http://ironfroggy-code.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list