"prasad rao" <prasadarao...@gmail.com> wrote

for x in dir(sys):
?? if sys.x is callable:

Even if you use the other suggestions to prove its callable that doesn't mean you can do this:

????  print sys.x()

If the callable takes parameters then this will fail.
You need to know quite a lot more about what you are calling and that is a non trivial task in the general case.

Alan G

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to