3

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. 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.

Is there a easy way to add debugging capabilities with python4delphi? Should I use other script engines like pascalScript (seems to have been discontinued)?

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). 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.

4
  • 1
    pdb? You can use pdb.set_trace() as breakpoints in your code. Commented Nov 5, 2012 at 20:27
  • 3
    You may have à look at PyScripter (code.google.com/p/pyscripter) wich has a debugger and use pythonForDelphi Commented Nov 5, 2012 at 22:41
  • @pythonm: Thanks for the hint. I had a look at it and this should work with python4delphi, but pdb is not really user-friendly. Of course I could implement a visual editor, dynamically set breakpoints, hotkeys, etc... but if there is a framework doing that already I would rather use it than code it all myself. Commented Nov 6, 2012 at 0:10
  • @philnext: PyScripter looks promising. If I could make the debugger work with python4delphi scripts it would be perfect, the tricky part is that p4d can import my delphi objects into python, and I think there is no way for PyScripter to read them.... oh well... I think I will have to read the source to find out. Commented Nov 6, 2012 at 0:21

1 Answer 1

2

Python is really a great language. But if you need to embed script, with debug, in a Delphi application you should considere Pascal scripting, which is more available in Delphi. I use the excellent PascalScipt, in the exemples you will see editor, debugger and a lot of other functions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.