Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
InProcessKernel fails to start with `pythonw` #10658
Comments
|
It's trying to set up some deprecated functionality. I think that setting Heads up, though, the in process kernel machinery doesn't work terribly well and is not a focus of development. |
polwel
commented
Jun 13, 2017
|
Thanks for the super quick response. That was awesome. Ok, I think I see the issue. When running if sys.executable.endswith('pythonw.exe'):
sys.stdout = open(self.logFilePath + '/stdout.txt', 'w')
sys.stderr = open(self.logFilePath + '/stderr.txt', 'w')Anyway, do you actually discourage the use of I am looking for a way to include a scripting tool into my application. I require access to some functionality of the app obviously. I don't exactly need all the bells and whistles of IPython, but it struck me as an easy and straightforward way. Thanks again for the help,, much appreciated. |
Yes, I've started a thread on the mailing list to consider officially deprecating it. It's kind of de facto deprecated already.
You can embed the kernel in your application and run the Qt console to talk to it as a separate window: It should also be possible to have the Qt console embedded in the application and talking over a ZMQ channel to the same process (i.e. not using InProcessKernel), but I don't think we have an example for this yet. |
polwel commentedJun 12, 2017
The code below runs fine when I run it via
python, but not viapythonw.It is adapted from a stackexchange post.
Anyhow, I traced the crash down to the
kernel_manager.start_kernel()line. The traceback is also given below.For what it's worth, I am on Windows, Python 3.5.2, IPython 5.1.0, PyQt 5.6. I use the Anaconda distribution.