Problem importing .pyd modules after 'import clr'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem importing .pyd modules after 'import clr'

Tribble, Brett

Just what it says. If I import the clr first, I can’t import other pyd files. I assume this is because of the way that pythonnet intercepts the import statement to do it’s magic. Now here is where it gets “fun”: This problem occurs when running from the version of Python 2.5 that is native to Maya, but does not occur when running from the ActiveState version of 2.5. In other words, the problem is specific to Maya.

 

For instance, if I import the Perforce API module first I get this:

>>>import P4API

>>>dir(P4API)

# Result: ['P4Adapter', 'P4Map', 'P4MergeData', '__doc__', '__file__', '__name__', 'identify'] #

 

However if I do it second to the clr, I get:

# Result: ['__doc__', '__file__', '__name__'] #

 

 

Any ideas?

 

Brett Tribble


_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet