From: Warren D. <wa...@de...> - 2005-10-18 14:16:06
|
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 =3D argv[argv.index("--"):] print my_argv[1], my_argv[2] Cheers, Warren -- Warren L. DeLano, Ph.D. =20 Principal Scientist . DeLano Scientific LLC =20 . 400 Oyster Point Blvd., Suite 213 =20 . South San Francisco, CA 94080 USA =20 . Biz:(650)-872-0942 Tech:(650)-872-0834 =20 . Fax:(650)-872-0273 Cell:(650)-346-1154 . mailto:wa...@de... =20 =20 > -----Original Message----- > From: pym...@li...=20 > [mailto:pym...@li...] On Behalf Of=20 > andrea spitaleri > Sent: Tuesday, October 18, 2005 12:47 AM > To: Pymol users > Subject: [PyMOL] feed value to pymol -qrc script.py >=20 > Hi there, > I made a script in pymol and I'd like to use it as pymol -qrc=20 > script.py argv[1] argv[2] ... > but it seems not working properly. It says that it cannot=20 > open such file, even if the argument is a number... > In fact, if I replace the sys.argv[] with the values into=20 > script.py, it woks. > Any help? >=20 > Regards >=20 > andrea >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads,=20 > discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users >=20 >=20 >=20 >=20 |