This is a read-only mirror of pymolwiki.org

Difference between revisions of "Run"

From PyMOL Wiki
Jump to navigation Jump to search
 
m (6 revisions)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===DESCRIPTION===
+
'''run''' executes an external Python script in a local name space, the global namespace, or in its own namespace (as a module).
+
 
  "run" executes an external Python script in a local name space, the
 
  global namespace, or in its own namespace (as a module).
 
 
 
===USAGE===
 
===USAGE===
   
+
  run python-script [, (local | global | module | main | private ) ]
  run python-script [, (local | global | module | main | private ) ]
+
 
 
 
===PYMOL API===
 
===PYMOL API===
+
Not directly available.  Instead, use :
  Not directly available.  Instead, use cmd.do("run ...").
+
cmd.do("run ...").
+
 
 
===NOTES===
 
===NOTES===
 +
The default mode for run is '''global'''.
 
   
 
   
  The default mode for run is "global".
+
Due to an idiosyncrasy in Pickle, you can not pickle objects directly created at the main level in a script run as "module", (because the pickled object becomes dependent on that module). Workaround: delegate construction to an imported module.  
 
  Due to an idiosyncracy in Pickle, you can not pickle objects
 
  directly created at the main level in a script run as "module",
 
  (because the pickled object becomes dependent on that module).
 
  Workaround: delegate construction to an imported module.  
 
  
[[Category:Commands|run]]
+
[[Category:Commands|Run]]

Latest revision as of 03:09, 28 March 2014

run executes an external Python script in a local name space, the global namespace, or in its own namespace (as a module).

USAGE

run python-script [, (local | global | module | main | private ) ]

PYMOL API

Not directly available. Instead, use :

cmd.do("run ...").

NOTES

The default mode for run is global.

Due to an idiosyncrasy in Pickle, you can not pickle objects directly created at the main level in a script run as "module", (because the pickled object becomes dependent on that module). Workaround: delegate construction to an imported module.