I want to print some info during loading of my data so I've added some
print's. I wanted to take advantage of printing the backspace character "\b"
to go back and overwrite the previous value.
Unfortunately, I've found out that the finish_launching() command breaks
this. Here is a simple example:
# -*- coding: utf-8 -*-
import sys, time
for n in xrange(100):
print("%3d %%\b\b\b\b\b\b" % n),
This will print a "percentage" without newlines. Uncommenting the
"pymol.finish_launching()" line will break this: the backspace character
seems to be ignored completely.
I cannot finish_launching() after my loop since the loop loads cgo objects,
thus it needs pymol fully opened to do so.
Is pymol "overloading" the print function? What's wrong here?
From: Jason Vertrees <jason.vertrees@sc...> - 2011-03-10 19:13:59
> I want to print some info during loading of my data so I've added some
> print's. I wanted to take advantage of printing the backspace character "\b"
> to go back and overwrite the previous value.
Can you use the curses Python module
(http://docs.python.org/library/curses.html) for this?
Jason Vertrees, PhD
PyMOL Product Manager
(o) +1 (603) 374-7120
Get latest updates about Open Source Projects, Conferences and News.