Gianluca, Note that you are getting into multithreaded programming, and this stuff isn't trivial.
If the output window isn't updating, it is likely because your thread is racing (hogging) the cpu instead of sleeping when idle. If busy-idling, be sure to throw a time.sleep(0.01) into your loops so that PyMOL gets some cycles too. To launch threads on a per-function basis, you'll currently need to fork a thread inside the function itself using the Python "threading" module. I suppose that is something we could eventually support at the command-parsing level -- an interesting idea. Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:[email protected] "Not yet a PyMOL Subscriber, but want to support the project? Email [email protected] to quote your lab, school, or employer. Thank you for sponsoring this open-source endeavor!" -WLD > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf > Of Gianluca Santarossa > Sent: Tuesday, June 05, 2007 4:19 AM > To: [email protected] > Subject: Re: [PyMOL] Adding 'interactive' script to pymol > > On Monday 04 June 2007 you wrote: > > Use "spawn" instead of "run". > In principle, it is working correctly, but it takes a lot of > time to refresh the pymol window. Any idea of why it occurs? > > Moreover, is there any way to 'unspawn' a script, or unload > it? And to 'spawn' > a function? > > Thanks, > Gianluca > -- > ============================================================== > Gianluca Santarossa > Institute for Chemical and Bioengineering Department of > Chemistry and Applied Biosciences ETH Zurich, Hönggerberg, > HCI, 8093 Zurich > > Phone: +41 44 633 4232 > E-Mail: [email protected] > ============================================================== > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyMOL-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pymol-users
