[IronPython] Hosted IronPython "cannot import" error

Blosser, Peter PeterBlosser at letu.edu
Fri Sep 11 17:25:23 CEST 2009


Thanks for the link, I wasn't aware that IronPython would not import
pyd.  That page you linked me to mentioned that there was a project for
IronPython called Ironclad that would allow importing of pyd files.  I
got ironclad, imported it and everything started working! Awesome!

 

Thanks for all the help!

Peter

 

From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Dave Fugate
Sent: Friday, September 11, 2009 8:21 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Hosted IronPython "cannot import" error

 

Just curious; what happens if you cd to site-packages and try to run the
same import directly from ipy.exe (with the -X:ExceptionDetail flag)?
Based on the fact you can get this to work with IDLE, I'd guess
packetlogic is C-based and hence subject to
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11333.

 

My best,

 

Dave

 

________________________________

From: users-bounces at lists.ironpython.com
[users-bounces at lists.ironpython.com] on behalf of Blosser, Peter
[PeterBlosser at letu.edu]
Sent: Thursday, September 10, 2009 3:19 PM
To: users at lists.ironpython.com
Subject: [IronPython] Hosted IronPython "cannot import" error

Hi.

I have been trying to implement a hosted IronPython solution in C#.  I
have been successful at executing basic python code, but  I am having
problems when trying to import a module.

 

The module I am trying to call is the packetlogic API for a traffic
shaping device, and I have been able to use it with IDLE, but not
IronPython.  (http://www.proceranetworks.com/pythonapi.html)

 

I was origionally getting the error of  "name 'packetlogic2' not
defined, but I noticed that the sys.path was empty when I ran the
program.  So I set the path to the folder where the module is located
using  AddToPath() in the PythonEngine, and now I am getting the current
error "cannot import PLv11 from packetlogic2.v11.plapi"

 

v11 and plapi are both folders that are under the packetlogic2 folder in
"site-packages", but it acts like it cannot find them.  Is there some
other  path that I need to setup?  Any ideas?

 

Thanks

---------------------

Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090911/442d4557/attachment.html>


More information about the Ironpython-users mailing list