Fixed @py to match the wiki documentation.

This commit is contained in:
Griatch 2010-10-21 23:06:55 +00:00
parent 31edce0ba1
commit 268328d36a

View file

@ -69,7 +69,17 @@ class CmdPy(MuxCommand):
Usage: Usage:
@py <cmd> @py <cmd>
In this limited python environment, only two In this limited python environment.
available_vars: 'self','me' : caller
'here' : caller.location
'obj' : dummy obj instance
'script': dummy script instance
'config': dummy conf instance
'ObjectDB' : ObjectDB class
'ScriptDB' : ScriptDB class
'ConfigValue' ConfigValue class
only two
variables are defined: 'self'/'me' which refers to one's variables are defined: 'self'/'me' which refers to one's
own object, and 'here' which refers to the current own object, and 'here' which refers to the current
location. location.
@ -100,7 +110,11 @@ class CmdPy(MuxCommand):
'here':caller.location, 'here':caller.location,
'obj':obj, 'obj':obj,
'script':script, 'script':script,
'config':conf} 'config':conf,
'ObjectDB':ObjectDB,
'ScriptDB':ScriptDB,
'ConfigValue':ConfigValue}
caller.msg(">>> %s" % pycode) caller.msg(">>> %s" % pycode)
try: try:
ret = eval(pycode, {}, available_vars) ret = eval(pycode, {}, available_vars)