Jump to content

PythonTerminal: Difference between revisions

From PyMOL Wiki
AdShea (talk | contribs)
No edit summary
 
AdShea (talk | contribs)
No edit summary
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)