User Tools

Site Tools


command:fork

Table of Contents

fork

“spawn” launches a Python script in a new thread which will run concurrently with the PyMOL interpreter. It can be run in its own namespace (like a Python module, default), a local name space, or in the global namespace.

Usage

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

Notes

The default mode for spawn is “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.

The best way to spawn processes at startup is to use the -l option (see “help launching”).

See Also

command/fork.txt · Last modified: 2013/08/19 21:00 (external edit)