[Python.NET] How to run in STA without spawning an extra thread

2020-05-18 Thread robert . hoelzl
I want to create a WPF app, which requires a STA thread. Unfortunately the main-thread of python.exe runs in MTA and thus cannot be utilitized. I had to spwan an extra thread, But this makes my IDE's (PyCharm) debugger not work any more (does not stop on breakpoints). I downloaded the Python.NET

[Python.NET] Re: How to run in STA without spawning an extra thread

2020-05-18 Thread robert . hoelzl
Ah I can answer the questions myself: Run the following sequence BEFORE "import clr": import ctypes ctypes.windll.ole32.CoInitialize(None) ___ PythonNet mailing list -- pythonnet@python.org To unsubscribe send an email to pythonnet-le...@python.org http

[Python.NET] Re: How to run in STA without spawning an extra thread

2020-05-18 Thread robert . hoelzl
Ah I can answer the questions myself: Run the following sequence BEFORE "import clr": import ctypes ctypes.windll.ole32.CoInitialize(None) ___ PythonNet mailing list -- pythonnet@python.org To unsubscribe send an email to pythonnet-le...@python.org http

[Python.NET] Re: How to run in STA without spawning an extra thread

2020-05-18 Thread robert . hoelzl
Ah I can answer the questions myself: Run the following sequence BEFORE "import clr": import ctypes ctypes.windll.ole32.CoInitialize(None) ___ PythonNet mailing list -- pythonnet@python.org To unsubscribe send an email to pythonnet-le...@python.org http