run-time inclusion of files

Chris Rebert clp2 at
Sun Sep 6 00:25:57 CEST 2009

On Sat, Sep 5, 2009 at 3:23 PM, <travis+ml-python at> wrote:
> Hello,
> I was wondering if there was something like Perl's "require" that allows
> you to import a file whose name is specified at run-time.  So far I've only
> seen imports of modules that are put in the standard module include path.

You'll need to use the `imp` module:


More information about the Python-list mailing list