I use python help() a good deal but get tired of paging through the __object__ stuff to get to what I use at my level, so I wrote the following to omit it. The problem is, I want to import it then use it as shorthelp.py for different modules so I could just type shorthelp(modulename). Only the import mechanism won't let me rename. I can only use the hardcoded imported module name, shutil in this case. If I try x = anothermodule, then import x, it doesn't work. import sys.argv[1] also doesn't work. Is there any way to get around this? I'm mostly interested in doing this from the repl rather than running from the console. Py3.4 win32
import shutil #this works to print non __xxx helpstrings for a module, but I can't substitute it. useful_helps = [] helps = dir(shutil) for helper in helps: if helper[0] == '_': continue useful_helps.append(helper) for helper in useful_helps: print(helper.upper() + ':', helper.__doc__, '\n') -- Jim After not doing dishes for a week and washing spoon after spoon, fork after fork, knife after knife - I suddenly understand the mathematical concept of infinity, which is just one more damn thing after another. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor