Davy-<br><br>I had a similar problem in that the EXE stub built by pyc does not work as expected. My problem was the sys.argv being set to None. As someone who comes to ironpython from Cpython, I want the ironpython equivalent of py2exe where everything just works :)<br>
<br>The best advice I've found here is to build your own C# stub exe (thanks Michael!)<br><br>For my own purposes, I'm going with a two step process. PYC to create the DLL of my script and imported modules. And C# stub that hosts ironpython, loads all the assemblies, and calls my Main().<br>
<br>Now looking at your sample code, I wonder if part of the problem is that you do not have references to the assemblies that the Ironpython console loads by default. Of course I could be wrong on everything.<br><br><br>
Bruce<br><br><br><br><br><div class="gmail_quote">
On Sun, Apr 5, 2009 at 5:54 AM, Davy Mitchell <span dir="ltr"><<a href="mailto:daftspaniel@gmail.com" target="_blank">daftspaniel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi Folks,</div>
<div> </div>
<div>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 </div>
<div>before loading its assemblies.</div>
<div> </div>
<div>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. </div>
<div>This can be worked around with shortcuts setting the working dir etc but having this option in code in PYC would be useful.</div>
<div> </div>
<div>Forgive me if I am very very muddled up about something :-)</div>
<div> </div>
<div>Thanks,</div>
<div>Davy Mitchell</div><font color="#888888">
<div> </div>
<div> </div>
</font><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>