[IronPython] ImportError: No module named

Lepisto, Stephen P stephen.p.lepisto at intel.com
Thu Apr 8 22:50:53 CEST 2010


Richard,

Try changing the suffix on the files to be .py instead of .ipy.  It appears that in IronPython 2.0 and 2.6, the import statement requires the modules to end in .py -- at least in the situation you are describing.


-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Richard Steventon
Sent: Thursday, April 08, 2010 1:13 PM
To: users at lists.ironpython.com
Subject: [IronPython] ImportError: No module named

Hi all,

I am moving some code from Python to IronPython (latest) so I can
access Excel XLSX files.  The code is a loose bunch of files in a
single directory.

ie:
   main.ipy
   accessFunctions.ipy

Within main.ipy, I do:
   from accessFunctions import *
Which gives:
   ImportError: No module named accessFunctions

Checked the path.  That's ok.  So I googled, and found Ben Hall's
blog: http://blog.benhall.me.uk/2008/05/ironpython-classes-within-separate.html
Which shows that it should work....

Any ideas ?

-Bye
-Richard
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list