P
pip
Hi all,
Pretend I have the following:
class foo:
commands = [
'name': 'help',
'desc': 'Print help',
]
def print_help(self):
print "Help is on the way!"
I would like to add another entry to the commands dict. called 'func'
or something which contains a reference to a function in the foo
class. What would the entry look like if atall possible?
I would rather not use eval if possible.
Thanks,
Pip
Pretend I have the following:
class foo:
commands = [
'name': 'help',
'desc': 'Print help',
]
def print_help(self):
print "Help is on the way!"
I would like to add another entry to the commands dict. called 'func'
or something which contains a reference to a function in the foo
class. What would the entry look like if atall possible?
I would rather not use eval if possible.
Thanks,
Pip