Takefumi,

You only need to worry about this if you're using an external Python
interpreter with a modular build of PyMOL.  For example, after
installing a late-model linux PyMOL RPM, you run

python script.py

Where script.py contains the following sequence:

import pymol
pymol.finish_launching()

which is needed to insure that PyMOL's API in the parallel thread is
defined ready to receive messages.

The problem is that PyMOL can't launch until "import pymol" completes
and returns and __main__.pymol is defined.  However, that means that the
next command in your script will need to be executed before PYMOL has
had a chance to initialize itself.  So the current approach is to launch
the PyMOL thread, and then call a function which blocks until PyMOL is
all ready to go...

Cheers,
Warren

[PS If there's anyone out there with a more elegant alternative for
launching the PyMOL thread from a standalone Python script, I'd sure
like to hear it : )].

--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-
> ad...@lists.sourceforge.net] On Behalf Of Takefumi Sora
> Sent: Wednesday, January 21, 2004 10:57 PM
> To: pymol-users@lists.sourceforge.net
> Subject: RE: [PyMOL] How to send pymol command to pymol by python
> interpreter
> 
> 
> Hi.
> 
> I appreciate your answer, Warren.
> Thank you.
> 
> Please let me ask one more question.
> 
> You said I need two lines first:
> import pymol
> pymol.finish_launching()
> 
> As long as I use,I can't the role of
> "pymol.finish_launching()"
> if I don't call this, what troubles will happen ?
> 
> Takefumi SORA
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users



Reply via email to