[Tutor] running multiple concurrent processes

richard kappler richkappler at gmail.com
Tue Oct 30 20:18:36 CET 2012

As I sit through the aftermath of Sandy, I have resumed my personal quest
to learn python. One of the things I am struggling with is running multiple
processes. I read the docs on threading and am completely lost so am
turning to the most excellent tutors here (and thanks for all the help,
past, present and future btw!).

In what ways can one run multiple concurrent processes and which would be
considered the "best" way or is that case dependent?


I'm working on programming a robot in Python. The bot has an Arduino board
that receives sensor input and sends the data to a laptop which is the
"brain" of the bot via pySerial and uses this incoming sensor data to help
determine state. State is used in decision making. The laptop runs a
program that we'll call the Master Control Program in a nod to Tron. The
bot also has a chat program, computer vision, some AI it uses to mine the
web for information, several other functions. Each of these  concurrent
programs (thus far all python programs) must run continuously and feed data
to the MCP which receives the data, makes decisions and sends out
appropriate action commands such as for movement, change of state,
conversation direction, what to research, etc.

So, to return to the original question, how does one run multiple
concurrent processes within python?

regards, Richard


sic gorgiamus allos subjectatos nunc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121030/a9253ff6/attachment.html>

More information about the Tutor mailing list