in what way does it not work? are you getting an exception? can you show
your code?
it should be something like this:
import imp
myModule = imp.load_source("c:/path/to/module.whatever", "moduleName") #
'moduleName' can be used in other modules now with a normal 'import'
statement.
myModule.runSomeFunc()
- Ofer
www.mrbroken.com
On Mon, Jul 5, 2010 at 3:53 AM, Francis Vega <[email protected]> wrote:
> Hi all!!
>
> I want to import modules with no extension or other than .py. I'm using
> __import__ for that, because the modules are imported by fileDialog.
> I tried imp.load_source() from this page
> http://stackoverflow.com/questions/881639/python-imports-importing-a-module-without-py-extension
> but
> it doesn't work for me :S
>
> Any ideas? Thanks !!!
>
> --
> http://groups.google.com/group/python_inside_maya
--
http://groups.google.com/group/python_inside_maya