Andrea, I don't know the technical reason, but I seem to remember that Warren advised users who wanted to use PyMOL functions from within a Python script to simply use PyMOL as your Python interpreter.
In other words, write your Python program, then do pymol -c myprog.py (the -c flag causes the program to run in batch mode i.e. not to start the GUI) Gareth On Thu, 28 Apr 2005, Andrea Spitaleri wrote: > After any answer, > I have been looking on this list and googling around (sorry if I > didn't before...) > there is: > # set path in order to use pymol modules > export PYMOL_PATH=/usr/local/pymol/ > export PYTHONPATH=/usr/local/pymol/modules/ > > then type python to enter in the shell and: > s...@darkstar:~> python > Python 2.3.3 (#1, Feb 5 2005, 16:22:10) > [GCC 3.3.3 (SuSE Linux)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pymol > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/local/pymol/modules/pymol/__init__.py", line 306, in ? > import _cmd > ImportError: No module named _cmd > >>> > I found already that someone got the same error but none helps him, so > I tought that this is a pymol bug, isn't ? > > thanks again for any help > > regards > > andrea > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > > ------------------------------------------------------------------------------- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth