Hell ty for your fast reply.<br><br><br>I compiled the dll using your script. I then did a clr.AddReference in my py code. I also switched to Python 2.6.0. I compiled my code and copied the necessary dlls from my IronPython install to my my executable output directory along with my xaml file.<br>
<br>How ever when I run my app from command &quot;p2pChat.exe&quot; it crashes with no error messages and returns to a shell.<br><br>This is the contents of my Directory<br><br>p2p/<br>              IronPython.dll<br>              IronPython.Modules.dll<br>
              IronPython.Modules.XML<br>              IronPython.XML<br>              Microsoft.Dynamic.dll<br>              Microsoft.Scripting.Core.dll<br>              Microsoft.Scripting.Debugging.dll<br>              Microsoft.Scripting.dll<br>
              Microsoft.Scripting.ExtensionAttribute.dll<br>              p2pChat.dll<br>              p2pChat.exe<br>              p2pChat.py<br>              p2pChat.xaml<br>              stdlib.dll<br><br>Any ideas <br>
<br>cheers<br><br>Andrew<br><br><br><br><div class="gmail_quote">On Mon, Jul 12, 2010 at 11:13 AM, Dino Viehland <span dir="ltr">&lt;<a href="mailto:dinov@microsoft.com">dinov@microsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">






<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">socket is actually a built-in in IronPython.  So you really only need threading.  But threading depends upon functools, and collections, and traceback.  I’m
 not sure how far the transitive closure goes so let’s just assume you’ll need to compile the entire standard library.  You can actually compile this into its own DLL using pyc.  So you could do:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal">import System</p>
<p class="MsoNormal">import pyc</p>
<p class="MsoNormal">files = System.IO.Directory.GetFiles(r&#39;C:\Program Files (x86)\IronPython 2.6\Lib&#39;)</p>
<p class="MsoNormal">files = [f for f in files if f.endswith(&#39;.py&#39;)]</p>
<p class="MsoNormal">import pyc</p>
<p class="MsoNormal">pyc.Main(files + [&#39;/out:stdlib.dll&#39;])</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’m just importing pyc directly here because for whatever reason it doesn’t accept wildcards.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">There’s a bug in 2.6.1 which prevents this from working – it’ll be fixed in 2.6.2.  You could compile w/ 2.6.0 to get a working EXE or you could remove any std lib modules that fail to compile.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Now you can just do a clr.AddReference(‘stdlib.dll’) in your script and the std lib will be available to you.<br>
<br>
<span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-width: medium medium medium 1.5pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; padding: 0in 0in 0in 4pt;">
<div>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>]
<b>On Behalf Of </b>Andrew Evans<br>
<b>Sent:</b> Monday, July 12, 2010 10:50 AM<br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> [IronPython] compiling an executable with the standard library</span></p>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">I am having problems compiling an executable. From what research I have done, I need to include in my compilation the python standard modules that I am using. How ever I can not figure out how to do this.<br>

<br>
Any advice would be appreciated here is the command I am using<br>
<br>
ipy &lt;path to pyc&gt;\pyc.py /main:&lt;path to app&gt;\p2pChat.py /target:exe<br>
<br>
these are the modules used in my script<br>
<br>
import socket<br>
from threading import *<br>
<br>
Thank you in advance<br>
<br>
</p>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">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>