Neat Trick for Loading Modules with unknown Name

Garry Knight garryknight at gmx.net
Mon Mar 22 22:07:47 CET 2004


In message <405E9A79.59E94615 at alcyone.com>, Erik Max Francis wrote:

> Brian Quinlan wrote:
> 
>> Do you really think that is easier than:
>> 
>> usersmod = __import__(modname)
> 
> I figured he was doing a little leg-pulling.

I figured he didn't own Lutz & Ascher's "Learning Python" in which both
methods appear.

-- 
Garry Knight
garryknight at gmx.net  ICQ 126351135
Linux registered user 182025



More information about the Python-list mailing list