[IronPython] How to import python folders as modules

John Machin sjmachin at lexicon.net
Wed Feb 27 11:07:18 CET 2008


Jose Ignacio Gisbert wrote:
> Ok, sorry guys for my lack of information. 
> 
> What I have is a folder called xmpp, with .py files including __init__.py In
> python2.5 I import it as normal module and it works perfectly, but in
> IronPython:
> 
> What I do is to create a folder named "xmpp" under App_Script folder (so
> xmpp path it's no necessary I think),

If you know what is necessary and what's not, you wouldn't need to be 
asking questions here. Just answer the questions.


> and after I attach xmpp files to it
> (including __init__.py). 
> 
> Then, I import module as I did in Python, "import xmpp", and what I receive
> is an error message with "No module named xmpp"
> 
> I am sure I do not using well Ironpython (I am new here), so if you need
> more information please tell me.
> 

I already asked for some *precise* information:

(1) What is the full path .....\xmpp\__init__.py ?

(2) When you do
      import sys; print sys.path
what do you see? In particular, does it include the answer to (1) ?

If you tell us that, we might be able to tell you what is going wrong.



More information about the Ironpython-users mailing list