来自 python 模块的 Dll 未在 Eclipse/PyDev 中发布
我正在使用 PyDev 单元测试在 Eclipse 中对 python c 模块进行单元测试。 开发步骤为: 我首先在 Eclipse 中编写 python 测试,然后编写通过的 c 代码 Codeblocks 中模块的测试。这是调用脚本的地方 为其创建 dll 和 ctypes 绑定。之后是“dll”和 “py”代码被复制到可以轻松导入模块的目录。 但有时我会收到错误: IOError: [Errno 13] Permission returned: 'C:\...\pyCModule.dll'
我还没有找到原因(停用代码分析和代码 完成没有帮助)。我已经检查过 Process Explorer(来自 sysinternals),它显示 eclipse 进程有 python.exe 作为子进程 (我想那是来自 PyDev)并且那个正在使用我的 pyCModule.dll (并且 并不总是释放它)。
有人有想要的想法可以在这里完成吗?或者出了什么问题?
提前致谢 !
弗朗西斯
I'm unit-testing a python c module in Eclipse using PyDev unit-testing.
The development steps are:
I first write the python tests in Eclipse and then the c code that passes
the tests for the module in Codeblocks. Here is where a script is called
to create a dll and ctypes bindings for it. After that the “dll” and the
“py” code is copied to a directory where the module can be easily imported.
But sometimes I get the error:
IOError: [Errno 13] Permission denied: 'C:\...\pyCModule.dll'
I’ve haven’t found the reason for that (deactivating code analysis and code
completion haven’t helped). I’ve checked with the Process Explorer (from
sysinternals) and it shows that the eclipse process has python.exe as child
(I suppose that’s from PyDev) and that one is using my pyCModule.dll (and
not always releasing it).
Does someone have and idea of want could be done here? or what is wrong?
Thanks in advance !
Francis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发生这种情况是因为 PyDev 启动了一个导入该 dll 的 shell(以完成代码完成)。您可以执行 Ctrl+2 杀死(将焦点放在 PyDev 编辑器中),以杀死 PyDev 可能生成的所有 shell(这样您就可以更新它)。
干杯,
法比奥
This happens because PyDev launches a shell that imports that dll (to do code-completion). You can do Ctrl+2 kill (with focus in a PyDev editor), to kill all the shells that PyDev may have spawned (that way you can update it).
Cheers,
Fabio