Dynamic package exploration
Paul Prescod
paul at prescod.net
Fri Jul 21 19:28:29 EDT 2000
Sebastien Pierre wrote:
>
> Hi !
>
> But if I do :
> >>eval ( "import os" )
> It doesn't work...so it prevents me from doing something
> dynamic...Ouch!
You *very seldom* need eval/exec in Python. Maybe this will help:
http://www.python.org/doc/current/lib/built-in-funcs.html
Look at __import__
--
Paul Prescod - Not encumbered by corporate consensus
New from Computer Associates: "Software that can 'think', sold by
marketers who choose not to."
More information about the Python-list
mailing list