Stan Pinte a �crit :
>hello,
>
>the following application (python/C#) is working properly, when I do not
>run simpy, a python framework. Once I enable, I get an immediate crash.
>
>
hello, I have skimmed the test case, and removed all dependancies toward
the Simpy framework.
Now it crashes once the python main loop is finished. If I comment out
the code used to pass a python function as a delegate to the C# frame,
it doesn't.
here is the code:
#test to show problem.
import sys,time
sys.path.append('.')
from CLR.System.Reflection import Assembly
a = Assembly.LoadWithPartialName("testpython")
from CLR.testpython import MainForm, TestDelegate
def test():
return "hop"
if __name__ == '__main__':
form = MainForm.GetInstance()
form.TestDelegateProperty = TestDelegate(test)
form.Start()
time.sleep(1)
print "done"
Stan.
>See enclosed for runnable/compilable example. (run "python test.py"). To
>run, it needs the Simpy framework, GPL, that you can get there:
>http://simpy.sourceforge.net/
>
>Simpy makes heavy uses of the "yield" construct.
>
>as soon as I uncomment that line in the script:
>
>#simulate()
>
>I get an immediate crash. I see no reason for this crash.
>
>I will open a tracker item.
>
>Stan.
>
>
>
>
_________________________________________________
Python.NET mailing list - [email protected]
http://mail.python.org/mailman/listinfo/pythondotnet