[wxPython-users] Adding GUI to already existing CLI framework
Andrea Gavana
andrea.gavana at gmail.com
Fri Aug 3 05:18:38 PDT 2007
Hi Frank,
On 8/3/07, Frank Aune wrote:
<snip>
<snap>
> Possible solutions for 2. I can think of:
> - Let CLI framework communicate with GUI over a UNIX socket, possibly using
> JSON socket API.
>
> - Use DBUS for signaling the GUI (the CLI framework deals with hotpluggable
> HW, so I think DBUS usage is a good idea anyway)
<snip>
<snap>
> - Just let the CLI framework send out wx.EVENTS and from CLI framework POW
> don't care if someone is listening. Then make the GUI respond to these
> events. This will make the framework depend on wx (at least it needs to
> import wx into its namespace and send out events), but perhaps this is an
> acceptable approach?
I must admit I am pretty lost with all your acronyms :-D
In any case, I don't see why an MVC/MVP approach wouldn't work in your
case: the MVC/MVP mantra is "separate the model from the GUI". Then,
what you'll do with the model (threads, different processes, sockets,
whatever), is no more relevant to the GUI itself. I am not that expert
in the MVP/MVC approach, but I would suggest you to take a look at:
http://wiki.wxpython.org/ModelViewPresenter
http://wiki.wxpython.org/ModelViewController
http://wiki.wxpython.org/LongRunningTasks
HTH.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
More information about the wxpython-users
mailing list