[IronPython] change in standard library behavior for compiled .exe/.dll???

Lukas Cenovsky cenovsky at bakalari.cz
Tue Oct 5 23:50:16 CEST 2010


  It's easy - just add the os.py to the build command with the correct path:

ipy.exe Tools\Scripts\pyc.py /target:exe /main:myprg.py /out:myprg 
myprg.py lib\os.py

You will probably need to add more references.

--
-- Lukáš


On 5.10.2010 23:27, Ken MacDonald wrote:
> I've been looking at the .exe's we built - using pyc.py - with IP 
> 2.5/.Net 3.5 and IP2.7 / .NET 4.0. In the 2.7 .exe, it appears that 
> the imports (like "os") are not being built into the .exe/.dll, but 
> instead are required to be imported in source form, e.g. "os.py" must 
> be somewhere on sys.path. In the IP 2.5 .exe's we had been building, 
> they would run fine on machines without the IP standard library 
> installed at all, in other words, with "os.py" not present on the 
> machine at all. We did notice that the .exe in question went from 
> being 2.9 MB in it's IP 2.5 incarnation, down to 1.2 MB in the IP 2.7 
> version, and the newer version requires that the source code for the 
> IP standard library be on the path. Is this a deliberate change in 
> behavior? We never had to package the standard library source when we 
> sent out .exe's to customers before
>
> >"os" is not an assembly but a Python module from the standard 
> library. You need to ensure >that the Python standard library (or the 
> parts that you use and their dependencies) is on the >path.
>
>
>     All the best,
>
>     Michael Foord
>
>>     and how do I ensure it gets found from my .exe - is there a
>>     specific env. variable, or the Windows %PATH% e.v., or something
>>     I haven't AddReference'd to????
>>     Thanks,
>>     Ken
>>
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.ironpython.com <mailto:Users at lists.ironpython.com>
>>     http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>     -- 
>     http://www.voidspace.org.uk/blog
>
>     READ CAREFULLY. By accepting and reading this email you agree,
>     on behalf of your employer, to release me from all obligations
>     and waivers arising from any and all NON-NEGOTIATED agreements,
>     licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
>     confidentiality, non-disclosure, non-compete and acceptable use
>     policies (”BOGUS AGREEMENTS”) that I have entered into with your
>     employer, its partners, licensors, agents and assigns, in
>     perpetuity, without prejudice to my ongoing rights and privileges.
>     You further represent that you have the authority to release me
>     from any BOGUS AGREEMENTS on behalf of your employer.
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101005/bc86c7df/attachment.html>


More information about the Ironpython-users mailing list