Table of Contents

run

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

Usage

run file [, namespace ]

Arguments

file = string: a Python program, typically ending in .py or .pym.

namespace = local, global, module, main, or private

Notes

The default mode for run is “global”.

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.

See Also

commands