Skip to content
Snippets Groups Projects
Commit 9a7ca644 authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

Added an helper to get the commands list and doc.

parent b0e6a353
No related branches found
No related tags found
No related merge requests found
...@@ -81,3 +81,25 @@ class Entity (object) : ...@@ -81,3 +81,25 @@ class Entity (object) :
""" """
wrap.entity_display_signals(self.obj) wrap.entity_display_signals(self.obj)
def signals(self) :
self.displaySignals()
def commands(self):
return wrap.entity_list_commands(self.obj)
def globalHelp(self):
for cstr in self.commands():
ctitle=cstr+':'
for i in range(len(cstr),15):
ctitle+=' '
for docstr in wrap.entity_get_command_docstring(self.obj,cstr).split('\n'):
if (len(docstr)>0) and (not docstr.isspace()):
print ctitle+"\t"+docstr
break
def help( self,comm=None ):
if comm is None:
self.globalHelp()
else:
print comm+":\n"+wrap.entity_get_command_docstring(self.obj,comm)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment