Andrea

pymol -qrc script.py arg1 arg2

will work if you add a double-hyphen before the first argument in order
to signal Pymol to stop interpreting arguments:

pymol -qrc script.py -- arg1 arg2

Then your script can get these arguments as follows:

from sys import argv
my_argv = argv[argv.index("--"):]
print my_argv[1], my_argv[2]

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 
> andrea spitaleri
> Sent: Tuesday, October 18, 2005 12:47 AM
> To: Pymol users
> Subject: [PyMOL] feed value to pymol -qrc script.py
> 
> Hi there,
> I made a script in pymol and I'd like to use it as pymol -qrc 
> script.py argv[1] argv[2] ...
> but it seems not working properly. It says that it cannot 
> open such file, even if the argument is a number...
> In fact, if I replace the sys.argv[] with the values into 
> script.py, it woks.
> Any help?
> 
> Regards
> 
> andrea
> 
> 
> -------------------------------------------------------
> 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