0

as already written in my other post, I'm currently writing an IDE/Debugger for IronPython.

But now I came across another problem.

I have libraries written in C#, which I call from my IronPython script.

When I now run the script in the console via "ipy.exe myScript.py" it works perfectly. But when I run it the following way I have problems with Threads in my C# libraries.

_pyEngine = Python.CreateEngine();
_pyScope = _pyEngine.CreateScope();
_pyEngine.ExecuteFile("myScript.py", _pyScope);

At least I think it is a problem with Threads, since I wait for an answer from another hw in a thread, while another Thread is blocked by a ManualResetEvent with a timeout. But instead of Setting the Event the Timeout Method is called, when running the script in embedded mode.

Does anyone have an idea what this might come from?

NameLess
  • 43
  • 4
  • You probably want to provide the myScript.py source or an alternative to reproduce the problem. Speculation isn't very useful :) – Michael Baker Sep 11 '11 at 00:12
  • The problem is that the Application is very complex. The script accesses C# Libraries where the threads are started. These are also quite complex and also partially confidential. But I'll try to reproduce with a simple example. – NameLess Sep 12 '11 at 07:11
  • You might be interested in looking at another IDE for IronPython, http://calicoproject.org/ It could be any number of issues: make sure you do GUI things in the graphics thread, make sure you lock things that could be being accessed at the same time. If you have a crash in another thread, you might not be seeing the output. – Doug Blank Sep 23 '11 at 23:29

0 Answers0