[Tutor] ?????

prasad rao prasadaraon50 at gmail.com
Mon May 25 14:24:15 CEST 2009

      I get a problem while trying to print non callable
items in dir(module).May be as the items are strings.

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

Traceback (most recent call last):
  File "<pyshell#10>", line 2, in <module>
    if sys.x is callable:
AttributeError: 'module' object has no attribute 'x'

Some one please tell me How  can I do that?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090525/eebeb73b/attachment.htm>

More information about the Tutor mailing list