[IronPython] How to compile has a DLL assembly ?
Prince0
prince0 at hotmail.com
Sat Jul 22 10:35:36 CEST 2006
Hi,
I have compiled my Python script and now I would like to use it as a
standard DLL assembly.
How can I do this?
Here's my current code:
List<string> files = new List<string>();
files.Add(@"c:\toto.py");
PythonCompiler compiler = new PythonCompiler(files, @"c:\toto.dll");
compiler.Compile();
Then:
private toto toto1;
ctor()
this.toto1 = new toto();
PythonModule pm = Ops.InitializeModule(this.toto1, "toto", new
string[0]);
pm.SystemState.stdout = new PythonFile(File.Create(@"c:\output.txt"),
Encoding.ASCII, "output", "w");
OnClick()
Ops.ExecuteCompiled(new InitializeModule(this.toto1.Initialize));
Is there a better way? It seems I will have to modify IronPython's source
code so I can also specify the args.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060722/517b3984/attachment.html>
More information about the Ironpython-users
mailing list