cherrypy and wxpython

2024/10/10 17:32:44

I'm trying to make a cherrypy application with a wxpython ui. The problem is both libraries use closed loop event handlers. Is there a way for this to work? If I have the wx ui start cherrypy is that going to lock up the ui?

Answer

See my answer at CherryPy interferes with Twisted shutting down on Windows

In short, CherryPy handles the main loop by default, but it definitely doesn't need to. Stop using quickstart and call engine.start without engine.block, and CP will run in its own threads and leave the main thread for your other framework to control.

https://en.xdnf.cn/q/69870.html

Related Q&A

What is the logic behind d3.js nice() ticks

I have generated some charts in d3.js. I use the following code to calculate the values to put in my y axis which works like a charm.var s = d3.scale.linear().domain([minValue, maxValue]); var ticks = …

Changing iterable variable during loop

Let it be an iterable element in python. In what cases is a change of it inside a loop over it reflected? Or more straightforward: When does something like this work?it = range(6) for i in it:it.remo…

Are CPython, IronPython, Jython scripts compatible with each other?

I am pretty sure that python scripts will work in all three, but I want to make sure. I have read here and there about editors that can write CPython, Jython, IronPython and I am hoping that I am look…

Python. Print mac address out of 6 byte string

I have mac address in 6 byte string. How would you print it in "human" readable format?Thanks

Cursors with postgres, where is the data stored and how many calls to the DB

Hi I am using psycopg2 for postgres access.I am trying to understand where "cursor" stores the returned rows. Does it store it in the database as a temporary table or is it on the clients en…

Django - How to allow only the owner of a new post to edit or delete the post?

I will be really grateful if anyone can help to resolve the issue below. I have the following Django project coding. The problem is: when the browser was given "/posts/remove/<post_id>/"…

Py4J has bigger overhead than Jython and JPype

After searching for an option to run Java code from Django application(python), I found out that Py4J is the best option for me. I tried Jython, JPype and Python subprocess and each of them have certai…

how to uninstall opencv-python package installed by using pip in anaconda?

I have tried to install OpenCV in anaconda. but when I use it, I figure out the instead of using OpenCV, the program using OpenCV-python and that why my program crashed. I type "conda uninstall op…

flask many to many join as done by prefetch_related from django

I have following Group and Contact model in flask with Sql Alchemy ORMgroup_contact = db.Table(group_contact,db.Column(group_id, db.Integer, db.ForeignKey(group.id)),db.Column(contact_id, db.Integer, d…

Django model inheritance - only want instances of parent class in a query

Lets say I have 2 models, one being the parent of another. How can I query all Places that arent restaurants in Django? Place.objects.all() would include all restaurants right? I want to exclude the …