[Tutor] Unable to take input as a module

Rakesh Mishra rakesh.mishra at gmail.com
Wed Feb 22 12:29:47 CET 2006


hi

I am trying to write a program, which ask for user input for a name
then determines it wither that is module or not, if module then it will
tell  all its
attributes, methods, function etc

my code:
..........
.
import sys, types, string, inspect

input= sys.argv[1]
print  inspect.ismodule(input)
................

here it always give false.  as what ever  input i take it is string .

my problem is i am not able to take input as a module
help me out !
thanks in advance.
rakesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060222/25c5efaa/attachment.html 


More information about the Tutor mailing list