[IronPython] How to generate an exe using IronPython.Hosting.PythonCompiler?
Sanghyeon Seo
sanxiyn at gmail.com
Wed Feb 22 06:38:56 CET 2006
2006/2/22, Alexei Vinidiktov <alexei.vinidiktov at gmail.com>:
> I'd like to use IronPython.Hosting.PythonCompiler for generating exe
> files from my scripts, but I can't figure out how to do it.
In the IronPython distribution, Src/Scripts/Tests/compiler.py should
be enough to get started.
Here's a minimal example in IronPython:
# compiler.py
from IronPython.Hosting import PythonCompiler
from System.Collections.Generic import List
sources = List[str]()
sources.Add('hello.py')
outfile = 'hello.exe'
compiler = PythonCompiler(sources, outfile)
compiler.Compile()
Seo Sanghyeon
More information about the Ironpython-users
mailing list