简体   繁体   English

有没有办法使用python4delphi组件调试python脚本?

[英]Is there a way to debug a python script using the python4delphi components?

I want to add scripting capabilities to my application and I just came across python4delphi http://code.google.com/p/python4delphi/ , which seems to be stable. 我想为我的应用程序添加脚本功能,我只是遇到了python4delphi http://code.google.com/p/python4delphi/ ,这似乎很稳定。 At first sight it looks very easy to use on the developers side, but I couldn't find a way to debug a script. 乍一看,它在开发人员方面看起来很容易使用,但我找不到调试脚本的方法。 Would be great if I could embed the IDLE IDE in my application, I just have no idea how to do it. 如果我可以在我的应用程序中嵌入IDLE IDE会很棒,我根本不知道该怎么做。

Is there a easy way to add debugging capabilities with python4delphi? 有没有一种简单的方法来添加python4delphi的调试功能? Should I use other script engines like pascalScript (seems to have been discontinued)? 我应该使用像pascalScript这样的其他脚本引擎(似乎已停止使用)?

Edit: After having a look at PySctipt and pdb I realized that what I am looking is more like a visual editor with embedded debugging and the capability to read python4delphi custom modules (the ones where I export my delphi objects. Being a python noob I have no idea how p4d does this). 编辑:看了PySctipt和pdb之后,我意识到我所看到的更像是一个带有嵌入式调试的可视化编辑器,并且能够读取python4delphi自定义模块(我导出我的delphi对象的那些。作为一个python noob我有不知道p4d如何做到这一点)。 I am probably asking too much, but would be great to find an implementation of that and not having to code it all from scratch. 我可能要求太多了,但是很高兴找到一个实现,而不必从头开始编写代码。

Python is really a great language. Python真的是一门很棒的语言。 But if you need to embed script, with debug, in a Delphi application you should considere Pascal scripting, which is more available in Delphi. 但是如果你需要在Delphi应用程序中使用debug来嵌入脚本,你应该考虑Pascal脚本,这在Delphi中更为可用。 I use the excellent PascalScipt , in the exemples you will see editor, debugger and a lot of other functions. 我使用优秀的PascalScipt ,在例子中你会看到编辑器,调试器和许多其他功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM