ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python.net
python.net
[Python.NET] Problem importing .pyd modules after 'import clr'
by Brett Tribble other posts by this author
Aug 14 2009 6:45AM messages near this date
Re: [Python.NET] PythonDotNet Digest, Vol 69, Issue 1 | [Python.NET] Python.Net and DataRow
FRAMEWORK Just what it says. If I import the clr first, I can't import other pyd files. I as
sume this is because of the way that pythonnet intercepts the import statement to do it's ma
gic. Now here is where it gets "fun": This problem occurs when running from the version of P
ython 2.5 that is native to Maya, but does not occur when running from the ActiveState versi
on 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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved