Dmitriy,

Due to problem with multithreading (especially with the Tcl/Tk external
GUI), we haven't been able to get the "import pymol" approach to work in
a stable robust manner across different OSes and environments.  

So sight now, as per comments in "modules/pymol/__init__.py", the only
supported way to launch PyMOL is to run the __init__.py script on
startup.

%python modules/pymol/__init__.py

Hoever, if you disable the external GUI, then you might be able to get
"import pymol" to work...

pymol_argv = ['pymol', '-qx']
import pymol
pymol.finish_launching()

from pymol import cmd

cmd.load(...etc.


Cheers,
Warren


--
Warren L. DeLano, Ph.D.                     
Principal Scientist

. DeLano Scientific LLC  
. 400 Oyster Point Blvd., Suite 213           
. South San Francisco, CA 94080 USA   
. Biz:(650)-872-0942  Tech:(650)-872-0834     
. Fax:(650)-872-0273  Cell:(650)-346-1154
. mailto:war...@delsci.com      
 

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net 
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
> Dmitriy Igor Bryndin
> Sent: Monday, October 10, 2005 2:33 PM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] PyMol segmentation fault while starting from 
> external python program
> 
> Launching PyMol form external python script will produce 
> segmaentation fault.
> For example starting "launch.py" from "/pymol/examples/launching"
>  ----------------------------------------------
> $ python launch.py
> zsh: segmentation fault  python launch.py
>  ----------------------------------------------
> Crashes without even showing PyMol windows. 
> 
> Tried it on Fedora Core 1, Fedora Core 4, Mandriva 2005. The 
> same story.
> Different pythons and compiling different versions of PyMol 
> does not change anything. 
> 
> It will launch PyMol windows if there is only
>    import pymol
> line. 
> 
> Adding
>    pymol.finish_launching()
> or
>    from pymol import cmd
>    cmd.load("$PYMOL_PATH/test/dat/pept.pdb")
> will produce segmentation fault. With no windows shown. 
> 
> The same time if I'll try to debug step by step, let's say, 
> "launch_demo.py" 
> (from "/pymol/examples/launching")
>  -------------------------------
> pymol.finish_launching()
> from pymol import cmd
> cmd.load("$PYMOL_PATH/test/dat/pept.pdb")
> cmd.show("sticks")
>  -------------------------------
> using IDLE. Everything will work. It starts windows, loads a 
> file, changes to sticks...
> Running it "python launch_demo.py" will wait for a second and 
> return segmentation fault. 
> 
> If someone knows what's going on, please help me. 
> 
>  Thanks
>    Dmitriy Bryndin 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, 
> discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 
> 
> 
> 

Reply via email to