Run the packet parsing event loop in a different thread.#291
Conversation
So that pyshark can be used in Jupyter Notebooks.
|
Any progress on this? Or workaround? I am new to python multiprocessing / |
|
+1 on being really interested in a solution. Not being able to run pyshark from within a Jupyter Notebook is really annoying... |
|
This patch is so important for my workflow that I'm using md11235's fork of pyshark now. Thanks md11235! |
|
I am using a workaround for now with nest_asyncio package. Although I would be interested to see if there is a solution that can be integrated within pyshark. |
|
Jupyter can run it now, assuming you exclusively use the async methods. I'll try to work on adding the missing ones but you can use ones like
|
|
Any progress on the PR? |
So that pyshark can be used in Jupyter Notebooks.
The version by KimiNewt works like a charm! I've use this library heavily win python scripts run in the command line. But when this version is run in a Jupyter Notebook, it will complain:
RuntimeError: Cannot run the event loop while another loop is runningAfter digging around the web, based on a code snippet from @fortuna at ipython/ipython#11030 , I've tried to come up with a little code to make pyshark run in Jupyter Notebooks.