I already attempted using py2exe (not compatible with ipy) and PYC (out of date). Can anyone point me in the direction of a good compiler?
I already attempted using py2exe (not compatible with ipy) and PYC (out of date).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
pyc.py, the Python Command-Line Compiler, which is included in IronPython since version 2.6 to compile a Python script to an executable. You find it at%IRONPYTONINSTALLDIR%\Tools\Scripts\pyc.pyon your hard disk.Example
Let’s assume you have a simple script
test.pythat just prints out something to console. You can turn this into an executable with the following command-line (assuming that the IronPython directory is the current directory and thattest.pyis in there, too):Note: If you are using forms and don’t want a console window to open, you want to use
/target:winexeinstead of/target:exe.The result will be two files,
test.dllandtest.exe.test.dllwill contain your actual script code, whiletest.exeis just a launcher fortest.dll. You can distribute this EXE and DLL to other computers which do not have IronPython installed if you include the filesIronPython.dll,Microsoft.Dynamic.dll,Microsoft.Scripting.Core.dll,Microsoft.Scripting.Debugging.dll,Microsoft.Scripting.dll,Microsoft.Scripting.ExtensionAttribute.dllandIronPython.Modules.dll(sometimes needed).Also see the blog entry IronPython – how to compile exe.