[IronPython] Importing embedded .py files

Fuzzyman fuzzyman at voidspace.org.uk
Tue Jul 4 10:03:29 CEST 2006


JoeSox wrote:

>On 7/4/06, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
>  
>
>>JoeSox wrote:
>>    
>>
>>>This is working except two of the embedded .py files import each
>>>other, so no matter which one I place first, it errors out.
>>>      
>>>
>>Try creating the empty modules and putting them in sys.modules first. I
>>think this is basically what the import machinery does in cases of
>>circular imports.
>>    
>>
>
>Yes, that worked.
>Now the only error I get from my project is still the
>"Unable to translate bytes [81] at index 0 from specified code page to Unicode"
>coming from the array.py file I am using
>http://codespeak.net/svn/user/nik/array_py/trunk/src/array.py
>
>It sounds like some incoming arraytype is set incorrectly but I doubt
>it because I haven't changed much of the code in the ConceptNet
>modules.  There must be something different between that array.py file
>and Python's builtin array but I have no idea since I really can't
>find the actual sourcecode for Python's array module.
>Also, I forget if I had it working with this new array.py file or my
>old array.py file.
>  
>
Hmmm... well here is the source code for the Python array module. I'm
not sure it will help much though.

http://svn.python.org/view/python/trunk/Modules/arraymodule.c?&view=markup

Perhaps you could contact the author of the PyPy version of array and
see if he can help. It looks like it's this guy :

http://ubique.ch/soc/?p=2

All the best,

Michael Foord
http://www.voidspace.org.uk/python/index.shtml

>Anyway, I appreciate the help.
>  
>




More information about the Ironpython-users mailing list