Hi all,
I'd like to execute pymol like: pymol -c script.py arg1 arg2 arg3 arg4.
(1) Reading into PyMolWiki
http://www.pymolwiki.org/index.php/Scripting, I've learned that I have
to type:
pymol -c script.py -- arg1 arg2 arg3 arg4
and then add to my script:
from sys import argv
my_argv =3D
Hi,
First, the initial error you were seeing was a syntax error:
from sys import argv
my_argv =3D argv[argv.index(--):]
print my_argv[1], my_argv[2]
is failing because of the word 3D
Second, that used to fail on Linux systems anyway (it worked on some
other systems). I tend to use optparse,
In the current open-source and beta builds (1.1),
pymol -c script.py -- arg1 arg2
should give a sys.argv of
['script.py', 'arg1', 'arg2']
paralleling the behavior of Python, given similar inputs:
python script.py arg1 arg2
Cheers,
Warren
PS. the 3D after the equals sign is annoying mailing