Michael,
A present, you can't simply import the PyMOL program as a module. You
need to use PyMOL as your Python interpreter.
You can use Run from the File menu or the run command from within PyMOL.
PyMOLcd c:\some_directory
PyMOLrun myscript.py
Since you are under windows, you can use the DOS/Win command shell:
C:\Program Files\DeLano Scientific\PyMOL\pymolwin.exe myscript.py
# command-line only scripts
C:\Program Files\DeLano Scientific\PyMOL\pymolwin.exe -qc myscript.py
- Warren
--
mailto:war...@sunesis.com
Warren L. DeLano, Ph.D.
Informatics Manager
Sunesis Pharmaceuticals, Inc.
341 Oyster Point Blvd.
S. San Francisco, CA 94080
(650)-266-3606 FAX:(650)-266-3501
-Original Message-
From: Sorich, Michael Joseph - SORMJ001
[mailto:michael.sor...@postgrads.unisa.edu.au]
Subject: [PyMOL] problem importing pymol.cmd module
I have just started to use PyMol. I wish link some scripts I have written in
python with PyMol using PyMol’s API. From what I understand, all I need to do
is import the module pymol.cmd and call the functions contained within.
However, when I attempt to import this module, I get the following error:
from pymol import cmd
Traceback (most recent call last):
File pyshell#0, line 1, in ?
from pymol import cmd
File C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\__init__.py,
line 137, in ?
import _cmd
ImportError: No module named _cmd
Where have I gone wrong? Any help would be appreciated.