[IronPython] Accessing CPython from compiled assemblies

David Escobar davidescobar at ieee.org
Fri Sep 18 08:34:04 CEST 2009


Of course, didn't think of that. I'll just copy over the modules I'm using
and then run the pyc script on them along with my own program files. Thanks.


On Thu, Sep 17, 2009 at 4:28 AM, Michael Foord <fuzzyman at voidspace.org.uk>wrote:

> David Escobar wrote:
>
>> I'm using IronPython 2.6 B2 and accessing the CPython 2.6 libraries in the
>> standard way.
>>
>> import sys
>> sys.path.append(r"c:\python26\lib")
>>
>> When I compile to an .exe, is there a way to link in the CPython libraries
>> I'm using? Otherwise I get an ImportError when I run the application on a
>> machine that does not have CPython 2.6 installed. Thanks.
>>
>
> Are you compiling to exe with the Pyc compiler? If so you will also need to
> compile the standard library modules that you use (*instead* of adding them
> to the path).
>
> Another technique is to have your own version of the standard library (or
> just the parts you use) in a directory in the same folder as your exe - and
> add *this* directory to the path instead.
>
> Michael
>
>  ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>>
>
>
> --
> http://www.ironpythoninaction.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090917/31f62d16/attachment.html>


More information about the Ironpython-users mailing list