Google App Engine是否支持Python的信号模块?

时间:2012-09-22 05:30:31

标签: python google-app-engine signals sandbox

  

可能重复:
  How can you limit the allowed execution time of specific methods in the python version of Google App Engine?

当我在Eclipse中运行以下代码时,没有任何事情发生,正如预期的那样:

import signal

def signal_handler(signum, frame):
    raise Exception, "Timed out!"
signal.signal(signal.SIGALRM, signal_handler)

但是,当我尝试使用GAE运行它时,我收到错误:

signal.signal(signal.SIGALRM, signal_handler)
AttributeError: 'module' object has no attribute 'signal'

我的猜测是GAE正在运行与Eclipse不同的Python版本,可能会删除/阻止某些模块,因为谷歌拥有这种权力。

我从以下代码获得了代码:How to limit execution time of a function call in Python

帮助?感谢

0 个答案:

没有答案