Hello Ed,
I understand it is wise to put GUI/DB code in one thread and
communication code into another, but how can these be coordinated?
Programming with wxWidgets would imply sending special events from
one thread to the other, but how to do that in Dabo? I'm a bit
overwhelmed with the various documentation/information sources
about Dabo, but I couldn't find the right hint.
Well, don't spend too much time searching the Dabo docs for
information on socket programming, because there isn't any. We
simply have not had a need to work with it, so it has not yet been
addressed.
I reckoned something like this... ;-)
One of my goals at the upcoming PyCon is to learn as much as I can
about the Twisted framework, with the goal of integrating it into
Dabo. [...]
Do you have much experience with Twisted?
Not at all, I'm afraid. From the first looks at Twisted, it seems to
be a great system for communication programming of all kinds.
Up to now I'm using a self-constructed framework which resembles a
stacked protocol implementation, with packets being generated from
high-level to low-level on the transmitting side and analyzed bottom-
up on the receiving side. There is a main loop with a central select
() call on all open file descriptors (whether sockets, V.24 or
other), together with timer/timeout management . Some years ago I
managed to integrate that with the Qt framework main loop, which
worked sufficiently well.
Today I would try to separate GUI (and DB, with Dabo) and
communication (with my own system) into separate threads. I would
then "only" have to synchronize between the threads. wxPostEvent()
has been suggested somewhere on the Net (for combining wxWidgets and
TCP/IP code), but how does this integrate with Dabo? Or could I
simply use one of the sync mechanisms in Python's thread management?
In worst case, it could even imply a mild form of polling, and the
latency time is no big problem.
Thx alot,
Stefan
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users