Take the 2-minute tour ×  I have a project that I'm writing in
Python that will be sending hardware (Phidgets) commands.
Because I'll be interfacing with more than one hardware
component, I need to have more than one loop running
concurrently.  I've researched the Python multiprocessing
module, but it turns out that the hardware can only be
controlled by one process at a time, so all my loops need to run
in the same process.  As of right now, I've been able to
accomplish my task with a Tk() loop, but without actually using
any of the GUI tools. For example:  from Tk import tk  class
hardwareCommand:     def __init__(self):         # Define Tk
object         self.root = tk()          # open the hardware,
set up self. variables, call the other functions          #
start the Tk loop      def hardwareLoop(self):         # Timed
processing with the hardware      def UDPListenLoop(self):
# Listen for commands from UDP, call appropriate functions
self.state = updateState(self.state)      def eventLis