[python-nl] dir(module_name)
UnrealEd
edunreal at gmail.com
Thu Mar 23 16:34:58 CET 2006
gegroet,
omdat ik redelijk wat modules gebruik bij mijn scripts, en omdat ik te lui
ben om op het web te gaan zoeken, wilde ik via een python scriptje alle
methods uit een module displayen via de functie dir(module_name). hier is
mijn code:
> print "Insert module to display:"
> mod = str(raw_input())
> print "\n",mod+":\n"
>for i in dir(mod):
> print i
>raw_input("\n\nAwaiting exit...")
wanneer ik echter een module invul, laat ons zeggen "os", dan geeft hij,
ongeacht welke module je invult, dezelfde waardes terug. heeft iemand een
idee waarom dit is?
mvg,
UnrealEd
--
View this message in context: http://www.nabble.com/dir%28module_name%29-t1330890.html#a3554068
Sent from the Python - python-nl forum at Nabble.com.
More information about the Python-nl
mailing list