[PyMOL] Command-line arguments when using PyMOL to launch a script

2008-02-15 Thread Josep Maria Campanera Alsina
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

Re: [PyMOL] Command-line arguments when using PyMOL to launch a script

2008-02-15 Thread Michael Lerner
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,

Re: [PyMOL] Command-line arguments when using PyMOL to launch ascript

2008-02-15 Thread DeLano Scientific
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