This is a read-only mirror of pymolwiki.org

Difference between revisions of "PythonTerminal"

From PyMOL Wiki
Jump to navigation Jump to search
 
Line 9: Line 9:
 
cmd.extend('py', parse)
 
cmd.extend('py', parse)
 
</source>
 
</source>
 +
[[Category:Script_Library]]

Revision as of 14:34, 31 May 2006

This is a small script to allow the execution of python commands from the PyMOL command line. It is very useful for both debugging, and for discovering new functions.

from pymol import cmd

def parse(command):
	exec command

cmd.extend('py', parse)