I have a Iron Python script that I want to run and then have the ipy interpreter output an assembly that I can run on other machines. How do I do that? Is there a switch I can pass to ipy.exe?
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.
There is a tool that ships with IronPython called Pyc or the Python Command-Line Compiler. If you installed the latest version 2.6 of IronPython, then
pyc.pywill be available atC:\Program Files (x86)\IronPython 2.6\Tools\Scriptsor wherever you installed IronPython on your system. If you have earlier versions of IronPython thenpyc.pywill be available as a separate download in the samples package.With
pyc.pyyou can create console or Windows assemblies from your python scripts. Basic usage looks like this:The above will generate an assembly called
myprogram.exe(/out) which is a console application (/target) and will execute the code inmainfile.pyfirst (/main) and will also include code fromprogram.pyandsupport.pyin the assembly.