[IronPython] compiling
Bryan
belred at gmail.com
Fri Mar 23 19:48:00 CET 2007
hi,
i just wrote my first ipy script and i have some questions.
# hello.py
import clr
clr.AddReference('System.Windows.Forms')
import System.Windows.Forms as WinForms
def show():
WinForms.MessageBox.Show('Hello', 'Hello World')
if __name__ == '__main__':
show()
when i execute the following
c:\> ipy -X:SaveAssemblies hello.py
a hello.exe file is generated and i can successfully execute it.
but when i compile with pyc as follows:
c:\> ipy pyc /main:hello.py
Input Files:
hello.py
Resource Files:
Output:
hello.exe
Target:
ConsoleApplication
-or-
c:\> ipy pyc /main:hello.py /target:winexe
Input Files:
hello.py
Resource Files:
Output:
hello.exe
Target:
WindowApplication
it generates hello.exe, but the program doesn't run (the MessageBox doesn't
display). i even tried explicitly adding /r:System.Windows.Forms without
luck. what am i doing wrong?
thanks,
bryan
More information about the Ironpython-users
mailing list