Chimera Commands Index

runscript script script-arguments

Runscript allows executing a Python script with command-line arguments from within Chimera. The script file is specified by pathname script. The script runs in the directory in which it resides (other files referenced in the script or its arguments can be specified by pathnames relative to that location). Arguments that include spaces must be enclosed by quotes, but quotes should not be nested, with the exception that single quotes can appear inside a double-quoted string and double quotes can appear inside a single-quoted string.

The chimera module is pre-imported into the script's global namespace, and the arguments are made into a tuple variable in the global namespace called "arguments" containing however many strings were supplied.

The command open can also execute Python scripts, but it does not include a way of supplying command-line arguments.

See also: pdbrun, startup option --script