Hi all,

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:

#!/usr/bin/env python2
# -*- coding: utf-8 -*-

import sys, time

import pymol
#pymol.finish_launching()

for n in xrange(100):
    print("%3d %%\b\b\b\b\b\b" % n),
    sys.stdout.flush()
    time.sleep(0.05)

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?

Thanks!
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to