HOW TO Create new module from source text

Jim Meier jim at
Sat Aug 10 01:46:42 EDT 2002

On Fri, 09 Aug 2002 17:08:34 -0600, Chris Gonnerman wrote:

> I know I've done this before but darned if I can figure out
> how.  I need to load a block of source text and convert it
> into a module.  I can't just use import because the name 
> being imported may match a builtin module.

Have a look at the imp module in the standard library.


More information about the Python-list mailing list