Neat Trick for Loading Modules with unknown Name

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

In message <405E9A79.59E94615 at>, 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  ICQ 126351135
Linux registered user 182025

More information about the Python-list mailing list