为什么我无法导入Python模块“signal”?在 Linux 中使用 Jython?
我找不到任何对 Jython 中遗漏的“信号”类的引用。使用 Jython 2.1。
谢谢
I can't find any reference to the 'signal' class being left out in Jython. Using Jython 2.1.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 Unix 风格的信号很难在 JVM 上实现,因为 JVM 没有信号的概念,并且可能需要一些 JNI 魔法才能使其工作。
在 Jython 2.5 中,该模块存在,但对于大多数函数似乎都会抛出
NotImplementedError
。I would imagine Unix-style signals are difficult to do on the JVM, since the JVM has no notion of signals, and it is likely some JNI magic would be required to get this to work.
In Jython 2.5, the module exists, but seems to throw
NotImplementedError
for most functions.