Files
Kiran Bandla df3980cb77 Added 1.83
2013-03-25 15:33:17 -04:00

39 lines
827 B
Python
Executable File

#!/usr/bin/env python
"""
(c) Immunity, Inc. 2004 - 2007
U{Immunity Inc.<http://www.immunityinc.com>}
"""
__VERSION__ = '1.0'
import immlib
DESC = "Return the usage information for a python command"
def usage(imm):
imm.log("!usage Returns the usage information for a pytho command")
def main(args):
imm = immlib.Debugger()
ret_str = None
if args:
try:
mod = __import__(args[0])
except ImportError:
return "Error: %s is not a python command" % args[0]
try:
ret_str = mod.usage(imm)
except AttributeError:
return "Sorry, no usage available for this command"
else:
return "No arguments given"
if ret_str is None:
return "See log window for usage information"