Python share CPU time?

Yannick yannick.leteigner at gmail.com
Wed Aug 9 14:01:40 EDT 2006


Hi,

I would like to program a small game in Python, kind of like robocode
(http://robocode.sourceforge.net/).
Problem is that I would have to share the CPU between all the robots,
and thus allocate a time period to each robot. However I couldn't find
any way to start a thread (robot), and interrupt it after a given time
period.
Any suggestions on how to proceed?
Is Python just not adapted to this kind of things?

Thanks,
Yannick




More information about the Python-list mailing list