Re: [PyMOL] Calling pymol from python - access to global variables

2011-03-29 Thread Thomas Holder
Hi Tsjerk, use either the global pymol.stored variable or the alter_state 'space' argument. -- #!/usr/bin/env python if __name__ == "__main__": import __main__ __main__.pymol_argv = [ 'pymol', '-cq' ] import pymol pymol.finish_launching() else: import pymol def identity(x,y,z):

[PyMOL] Calling pymol from python - access to global variables

2011-03-29 Thread Tsjerk Wassenaar
Hi, I'm having some trouble accessing a function defined at top level with alter_state in a python script launching pymol. Maybe I shouldn't be wanting to do this, but what I'm trying, and failing to do is exemplified by this script: ### #!/usr/bin/env python import pymol if __name__ == "__mai