User Tools

Site Tools


api:cmd:extend

cmd.extend

“cmd.extend” is an API-only function which binds a new external function as a command into the PyMOL scripting language.

Parameters

cmd.extend(string name,function function)

ON EXAMPLE

def foo(moo=2): print moo
cmd.extend('foo',foo)

The following would now work within PyMOL:

PyMOL>foo
2
PyMOL>foo 3
3
PyMOL>foo moo=5
5
PyMOL>foo ?
Usage: foo [ moo ]

Implementation

def extend(name,function):

See Also

api/cmd/extend.txt · Last modified: 2013/08/19 21:01 (external edit)