我需要同时运行两个循环

时间:2014-04-09 14:32:57

标签: python python-2.7

我正在使用python对游戏Qix进行基本翻拍,而且我在移动方面遇到了麻烦。
虽然我有关键字的函数,但是在我的其他循环运行时我无法执行它们。我如何使用像from multiprocessing import Process这样的库同时运行它们?

以下是代码:

evil_moves() 'is the function that loops indefinitely' 

wn.onkey(move_left, "Left")  'there are four of these, one for each direction'
wn.listen()  

0 个答案:

没有答案