<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx</link><description>The ability to compile IronPython scripts into .NET IL and to save them to disk existed in IronPython 1.0 but has been missing in 2.0 so far. With IronPython 2.0 Beta4 this has been added back. Why would I compile dynamic language scripts? There are a</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>a-foton &amp;raquo; Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#8836279</link><pubDate>Wed, 06 Aug 2008 09:36:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8836279</guid><dc:creator>a-foton &amp;raquo; Static Compilation of IronPython scripts</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.a-foton.ru/2008/08/static-compilation-of-ironpython-scripts/"&gt;http://blog.a-foton.ru/2008/08/static-compilation-of-ironpython-scripts/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9008236</link><pubDate>Tue, 21 Oct 2008 01:11:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9008236</guid><dc:creator>Juba17</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I made a small tool in Ironpython. Im new to it and when testing everything is ok.&lt;/p&gt;
&lt;p&gt;But I've been trying to compile both scripts (program script and form class script without sucess)&lt;/p&gt;
&lt;p&gt;I just can't get it to work has a standalone exe. I followed the example above:&lt;/p&gt;
&lt;p&gt;import clr&lt;/p&gt;
&lt;p&gt;clr.CompileModules(&amp;quot;form.dll&amp;quot;, &amp;quot;foo.py&amp;quot;, &amp;quot;form.py&amp;quot;, mainModule=&amp;quot;program.py&amp;quot;)&lt;/p&gt;
&lt;p&gt;And I get the form.dll but then I want to get the executable and I get lost. Saw the pyc example and tried to compile with the pyc but get an error about the CompilerSink.&lt;/p&gt;
&lt;p&gt;Could you please point more info on how to compile to exe the applications?&lt;/p&gt;
&lt;p&gt;My version is Ironpython v. 2 beta 5&lt;/p&gt;
&lt;p&gt;Greetings&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9014300</link><pubDate>Fri, 24 Oct 2008 10:03:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9014300</guid><dc:creator>srivatsn</dc:creator><description>&lt;p&gt;For creating a exe you have to use the pyc sample like this:&lt;/p&gt;
&lt;p&gt;ipy.exe pyc.py /main:program.py foo.py form.py /target:winexe&lt;/p&gt;
&lt;p&gt;I suppose this is throwing an error for you. Why don't you send a mail to me via the contact link with the exact error?&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9015820</link><pubDate>Sat, 25 Oct 2008 09:30:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9015820</guid><dc:creator>Juba17</dc:creator><description>&lt;p&gt;Sry but can't see contact link. I will post the error:&lt;/p&gt;
&lt;p&gt;line:&lt;/p&gt;
&lt;p&gt;ipy.exe &amp;quot;D:\IronPython 2.0\Samples\Pyc\pyc.py&amp;quot; /main:&amp;quot;D:\IronPython 2.0\proyeto cod4\warning_system.py&amp;quot; &amp;quot;D:\IronPython 2.0\proyeto cod4\cod4form.py&amp;quot; /target:winexe&lt;/p&gt;
&lt;p&gt;error:&lt;/p&gt;
&lt;p&gt;Traceback (most recent call last):&lt;/p&gt;
&lt;p&gt; &amp;nbsp;File &amp;quot;D:\IronPython 2.0\Samples\Pyc\pyc.py&amp;quot;, line 35, in D:\IronPython 2.0\Sam&lt;/p&gt;
&lt;p&gt;ples\Pyc\pyc.py&lt;/p&gt;
&lt;p&gt;AttributeError: 'namespace#' object has no attribute 'CompilerSink'&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9016569</link><pubDate>Sun, 26 Oct 2008 11:45:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9016569</guid><dc:creator>Juba17</dc:creator><description>&lt;p&gt;Yes I checked and pyc can't be used with 2.0 version since the only attributes available in Hosting call are:&lt;/p&gt;
&lt;p&gt;['ErrorCodes', 'Python', 'PythonCommandLine', 'PythonConsoleOptions', 'PythonOptionsParser']&lt;/p&gt;
&lt;p&gt;So how is the independent executable made after all?&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9017360</link><pubDate>Mon, 27 Oct 2008 05:37:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9017360</guid><dc:creator>srivatsn</dc:creator><description>&lt;p&gt;Are you using the 1.0 pyc sample by any chance? The sample was updated for 2.0 and is here - &lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=14353"&gt;http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=14353&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9019163</link><pubDate>Tue, 28 Oct 2008 00:55:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9019163</guid><dc:creator>Juba17</dc:creator><description>&lt;p&gt;Thanks for your help ;)&lt;/p&gt;
&lt;p&gt;I managed to compile it with pyc but I must've misunderstand the topic since when I compiled it still requires python lib and Ironpython dlls.&lt;/p&gt;
&lt;p&gt;am I doing something wrong or it's suppose to be that way? I mean to a simple app to distribute I have to included the all of python lib? It's not pratical, I must be wrong.&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9019184</link><pubDate>Tue, 28 Oct 2008 01:04:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9019184</guid><dc:creator>srivatsn</dc:creator><description>&lt;p&gt;You will require the four IronPython DLLs for the exe to run but you can compile the python libraries along with your py files. It doesn't have to be the entire python library as well- only files that are required by your app.&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9019483</link><pubDate>Tue, 28 Oct 2008 03:08:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9019483</guid><dc:creator>Juba17</dc:creator><description>&lt;p&gt;So i need to include in the compile all the regular modules? os, sys, socket, so on? But sometimes they need other modules to run. For instance. When i compiled the last time it required me some modules and other modules those modules run. Isn't there a easy way to know wich one are the sub-modules?&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9027034</link><pubDate>Fri, 31 Oct 2008 20:56:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9027034</guid><dc:creator>srivatsn</dc:creator><description>&lt;p&gt;There might be some static dependency analysis tools for python out there. I'm not aware of any though.&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9193499</link><pubDate>Thu, 11 Dec 2008 03:19:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9193499</guid><dc:creator>Guy Rozendorn</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have written a file called myProg.py, and compiled it to myProg.dll and myProg.exe using the pyc.py example file (using IronPython-2.0).&lt;/p&gt;
&lt;p&gt;The thing is that the presence of IronPython.dll and myProg.dll is required in the directory from which I am executing pyProg.exe.&lt;/p&gt;
&lt;p&gt;What's the magic I need to make so I could execute pyProg.exe from anywhere (i.e it would search the dlls in the same directory pyProg.exe is in, and not in the directory I'm executing from)?&lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;p&gt;pyProg.exe, pyProg.dll and IronPython.dll are in C:\Temp, and I'm doing:&lt;/p&gt;
&lt;p&gt;C:\WINDOWS&amp;gt; C:\Temp\pyProg.exe&lt;/p&gt;
&lt;p&gt;This doesn't work, because the DLLs are in C:\Temp, and not in C:\WINDOWS.&lt;/p&gt;
&lt;p&gt;I want to run pyProg.exe from C:\WINDOWS (or any other directory), but I don't want to copy the DLLs to C:\WINDOWS (or any other directory).&lt;/p&gt;
&lt;p&gt;Is this possible?&lt;/p&gt;
&lt;p&gt;Is it possible to make compile my ironpython script as a standalone exe? meaning, compiling it to an exe that contains all the code,&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9248651</link><pubDate>Tue, 23 Dec 2008 02:05:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9248651</guid><dc:creator>srivatsn</dc:creator><description>&lt;p&gt;C:\Temp\pyProg.exe should work since the dependencies are picked up from the directory of the executable as well. If you want to copy pyprog.exe to some other place, you can create a pyprog.exe.config file and use the assemblybinding tag - &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/twy1dw1e"&gt;http://msdn.microsoft.com/en-us/library/twy1dw1e&lt;/a&gt;(VS.80).aspx&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9459360</link><pubDate>Thu, 05 Mar 2009 09:10:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9459360</guid><dc:creator>Dinesh Varadharajan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;we are migrating an existing cpython app to ironpython to work with silverlight. We have so many packages and subpackages in cpython and to work with silverlight we tried to convert them all into a dll. &lt;/p&gt;
&lt;p&gt;The dll conversion is fine and all files are part of dll, but all the packages can be referred only from the main module. The modules that are present inside packages are not able to refer any other packages. Are we missing something basic.&lt;/p&gt;
</description></item><item><title>IronPython pyc</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9466450</link><pubDate>Sun, 08 Mar 2009 23:31:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9466450</guid><dc:creator>el blog de cHagHi</dc:creator><description>&lt;p&gt;Estuve investigando el supuesto camino de pre-compilar m&amp;amp;oacute;dulos para ver si lograba resolver los problemas de performance que mencion&amp;amp;eacute; hace unos d&amp;amp;iacute;as. Resulta que la punta del iceberg estaba escondida en el pack de ejemplos de ...&lt;/p&gt;
</description></item><item><title>re: Static Compilation of IronPython scripts</title><link>http://blogs.msdn.com/srivatsn/archive/2008/08/06/static-compilation-of-ironpython-scripts.aspx#9468106</link><pubDate>Mon, 09 Mar 2009 22:06:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9468106</guid><dc:creator>srivatsn</dc:creator><description>&lt;p&gt;Dinesh, packages importing other packages from within the dll should work without any extra work. If you can send me a minimal reproduction of the problem, I can probably be of more assitance. Feel free to use the contact link to e-mail me - &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/srivatsn/contact.aspx"&gt;http://blogs.msdn.com/srivatsn/contact.aspx&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>