Eclipse/WingIDE/PyCharm 中的 PySide 方法签名?
有没有办法在 Eclipse、WingIDE、PyCharm 或任何 Python IDE 中获得 PySide 类方法的签名? 目前,它会自动补全类和方法名称,但不会自动补全方法的参数。 所有函数都被检测为不带参数的函数。
我知道它是 C++ 框架的 Python 绑定,所以它并不那么容易,但有什么方法可以直接在IDE中获得方法签名吗?
Is there any way to have the signature of the methods of PySide classes in Eclipse, WingIDE, PyCharm or any Python IDE?
Currently, it auto-completes the classes and method names, but not the parameters of the methods.
All functions are detected as functions without parameters.
I know it's a Python binding of a C++ framework so it's not that easy but is there any way to have the method signatures directly in an IDE?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 PyDev (Eclipse 插件),它的工作方式就像一个魅力,也带有函数签名。
编辑:
我对 C++ 扩展不是 100% 确定,但如果有一个 Python 包装器,它应该可以很好地工作。使用纯 C++ 扩展可能会出现问题,但实际上我还没有尝试过。
I use PyDev (Eclipse plugin) and it works like a charm, also with function signatures.
EDIT:
I'm not 100% sure with C++ extensions, but it should work well if there's a Python wrapper for it. With pure C++ extensions there might be problems, but actually I haven't tried it.
尝试在 Python 控制台中运行 help(some-qt-method),你会看到什么?确切地。
据我所知,唯一能深入处理 PyQt / PySide 的 IDE 是 Eric,而且只是因为它以自己的格式显式编译签名以实现自动完成。
Try running help(some-qt-method) in a Python console, what do you see? Exactly.
As far as I know, the only IDE that handles PyQt / PySide in depth is Eric, and only because it explicitly compiles signatures in its own format for autocompletion.