[IronPython] How to import python folders as modules

Michael Foord fuzzyman at voidspace.org.uk
Wed Feb 27 12:18:04 CET 2008


Jose Ignacio Gisbert wrote:
> What I undestand is that App_Script folder is like App_Data in C# but in
> IronPython, in Visual Studio. If I put there a .py python module, then from
> code I can import it as it was in the same folder. For example, if I put a
> file called bscw.py in App_Script, I can import it then by calling "import
> bscw.py".
>
>   

There is a bug in the ASP.NET IronPython integration that prevents you 
from using packages (I believe). If this is where you are finding this 
problem then you will probably be better off asking questions on the 
IronPython for ASP.NET mailing list.

Michael Foord
http://www.manning.com/foord

> -----Mensaje original-----
> De: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] En nombre de Sanghyeon Seo
> Enviado el: miércoles, 27 de febrero de 2008 10:12
> Para: Discussion of IronPython
> Asunto: Re: [IronPython] How to import python folders as modules
>
> 2008/2/27, Jose Ignacio Gisbert <jigisbert.etra-id at grupoetra.com>:
>   
>>  What I do is to create a folder named "xmpp" under App_Script folder (so
>>  xmpp path it's no necessary I think), 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"
>>     
>
> What is App_Script folder?
>
>   




More information about the Ironpython-users mailing list