Mart Somermaa wrote: > But I'm still +1 for adding 'tail'/'submodule'/'tailmodule' > argument to __import__ instead of providing an almost identical > copy in imp.import_module(). > > Let me know which of the approaches is desired (if any) and I'll > add tests and update docs.
Have you considered using runpy.run_module() instead? i.e. do you actually need the resulting module object, or just the global namespace produced by running its code? If the latter, then run_module() is a much better way of going about it as it has (slightly) fewer side effects on the import system's internals. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com