私は、Pythonを使ってゲームプロトタイプを作成しています。本の一つを参照すると、私は現在、ただし、上記のコードはエラーでUbuntuマシンに障害が発生したゲームreactor.doSelect()とreactor.runUntilCurrentに関する問い合わせ
def iterate(self):
now = time.time()
interval = now - self.beginFrame
self.beginFrame = now
# update the network
reactor.runUntilCurrent()
reactor.doSelect(0)
# update the games
for game in self.games:
game.update(interval)
を更新するには、次のコードを使用しています「はAttributeError: 『EPollReactor』オブジェクトには、属性 『のdoSelect』がありません」。私はねじれ16.1.1を使用しています。私の質問は以下です
1)twistedmatrixで提供されているマニュアルでrunUntilCurrentメソッドとdoSelectメソッドが見つかりませんでした。
2)reactor.iterate()はdoSelect()を置き換えていますか? 3)以前の投稿から、reactor.iterate()がアプリケーションを遅くてバグの原因になることがわかった。実際のUIアップデートが必要な状況を処理する最善の方法は何ですか?