[IronPython] Modifying The PYC Stub EXE

Dino Viehland dinov at microsoft.com
Mon Apr 6 17:18:33 CEST 2009


What DLLs you want to be loaded?  The reason I ask is that .NET assembly loading doesn't really work on the basis of the current working directory - instead it looks at the app base which by default is where your EXE is located.  We do modify sys.path so that IronPython can load things outside of the app base but I wouldn't suggest pushing this too far.  Instead I'd propose doing what a normal build process does and copy the DLLs into the build directory.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell
Sent: Sunday, April 05, 2009 3:55 AM
To: Discussion of IronPython
Subject: [IronPython] Modifying The PYC Stub EXE

Hi Folks,

I am looking to modify the EXE stub generated by PYC so that it will set the current working directory to the location of the EXE
before loading its assemblies.

The problem I am having is I build my EXE to a sub-folder called BUILD. If I call it in the form .\build\die.exe then it can't find the DLLs.
This can be worked around with shortcuts setting the working dir etc but having this option in code in PYC would be useful.

Forgive me if I am very very muddled up about something :-)

Thanks,
Davy Mitchell


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


More information about the Ironpython-users mailing list