WxPython + multiprocessing: checking if color string is correct

I have a wxPython program with two processes: primary and secondary (I am using the multiprocessing module.) The primary launches the wxPython GUI, the second does not. However, there is something I would like to do from a secondary process: given a line that describes a color, to check if that would be a legal color for wxPython. This means whether I can create wx.Pen(color_string)

or not.

How to do it?

(I tried to make a wx.Pen and compare its color to zero color, but that required creating a wx.App in a second process, and when I created it the program raised an error in some special wxPython window.)

0


a source to share


1 answer


You can make two queues between two processes and transfer the second wx-related functionality using the first queue (by clicking on the first queue the parameters of the task being executed and waiting for the result on the second).



+1


a source







All Articles