Hi Tim,
You can use two dashes on the command line, like:
pymol -r get_neighbors.py -- ALA
And then access them using sys.argv in your script.
For example: save the following as tmp_pymol.py and run: 'pymol -r
tmp_pymol.py -- ALA' ( without quotes)
>>>>
from pymol import cmd
import sys
def foo(string):
print string
return
cmd.extend('foo',foo)
if __name__ == '__main__':
foo(sys.argv[1])
>>>
Hope this helps,
Matt
On 02/22/2013 10:50 AM, Someone Else wrote:
Hi everyone,
I would like my PyMOL script take a command line parameters, e.g:
pymol get_neighbors.py ALA
How to extract "ALA" from inside my neighbors.py?
Best regards,
Tim
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]