Import module with non-standard file name

"Martin v. Löwis" martin at v.loewis.de
Tue Aug 8 15:24:40 EDT 2006


Ben Finney schrieb:
> Question: I have Python modules named without '.py' as the extension,
> and I'd like to be able to import them. How can I do that?

I recommend to use imp.load_module.

Regards,
Martin



More information about the Python-list mailing list