On 03/09/12 15:04, richard kappler wrote:
what I'm looking for. The bot would have several "threads" running
concurrently so as to be aware of it's state, such as a vision thread,
an object and face recognition thread, a chat thread, a command and
control thread, a nav thread, you get the idea. In order to do this in
python, should I be looking at threads, multiprocessing, something else
or is this not practicable in python?
Threads. Multiple processes would be overkill for this.
And yes its fine in Python. Check out the threading module.
Several online tutorials on how to use it too.
My only caveat is not to have too many, especially
conflicting controls. For example anything that causes the bot to move
should be in a single thread or you wind up with two threads competing
with each other to move the bot in two directions at once. Similarly
vision and face recognition could conflict.
Hopefully you get my drift.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor