I tried that, with no luck.
However, that is the same way I am leaning. Especially if I use
/target:exe instead of /target:winexe as I then get an exception
immediately in the console window:
[C:\work\Iron Python Sandbox\WpfApplication1]WpfApplication1.exe
Unhandled Exception: IronPython.Runtime.Exceptions.ImportException: No
module named wpf
at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object
value)
at DLRCachedCode.__main__$1(CodeContext $globalContext, FunctionCode
$functionCode)
at IronPython.Compiler.OnDiskScriptCode.Run()
[snip]
On Tuesday, July 05, 2011 11:21:48 AM, Jeff Hardy wrote:
Hi Chaim,
My guess is that it can't find the wpf module - which, in 2.7 at
least, is IronPython.Wpf.dll. You'll probably need to put that file
(from the DLLs directory of IronPython) into the same folder as your
.exe.
- Jeff
On Tue, Jul 5, 2011 at 6:59 AM, Chaim Krause<ch...@chaim.com> wrote:
Runs fine in IronPython IDE /Visual Stud
io 2010, but...
Using minimal code:
import wpf
from System.Windows import Application, Window
class MyWindow(Window):
def __init__(self):
wpf.LoadComponent(self, 'WpfApplication1.xaml')
if __name__ == '__main__':
Application().Run(MyWindow()
Compiling using pyc.py and attempting to run resulting EXE I get an error in
windows' application event log
Application: WpfApplication1.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: IronPython.Runtime.Exceptions.ImportException
Stack:
at
Microsoft.Scripting.Interpreter.Interpreter.Run(Microsoft.Scripting.Interpreter.InterpretedFrame)
at Microsoft.Scripting.Interpreter.LightLambda.Run8[[System.__Canon,
mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5
c561934e089],[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.Int32, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]](System.__Canon, System.__Canon,
System.__Canon, System.__Canon, System.__Canon, System.__Canon,
System.__Canon, Int32)
at System.Dynamic.UpdateDelegates.UpdateAndExecute7[[System.__Canon,
mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[Sys
tem.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Int32, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089]](System.Runtime.CompilerServices.CallSite,
System.__Canon, System.__Canon, System.__Canon, System.__Canon,
System.__Canon, System.__Canon, Int32)
at
IronPython.Runtime.Importer.ImportLightThrow(IronPython.Runtime.CodeContext,
System.String, IronPython.Runtime.PythonTuple, Int32)
a
t
IronPython.Runtime.Operations.PythonOps.InitializeModule(System.Reflection.Assembly,
System.String, System.String[])
at PythonMain.Main()
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users