[Ironpython-users] Launch ipy.exe from Host

Keith Rome rome at Wintellect.com
Sat Mar 15 02:50:36 CET 2014


Depending upon your goals you may be able to get by with implementing a function and installing it with sys.settrace() from your hosting application. I've managed to implement a full in-application dev IDE built around that capability.

The function you install as a trace handler gets invoked for each line of code being executed as well as each time a new code block/function in the python script is entered/exited. You can use that like a breakpoint - script execution is suspended until the trace function returns. You have full access to the current script scope and can get information about the source code file and line number too.

It requires some effort to get advanced debugging features, but it is certainly possible.


Keith Rome
Principal Architect @ Wintellect (www.wintellect.com<http://www.wintellect.com>)
770.617.4016 | krome at wintellect.com<mailto:rome at wintellect.com>

[cid:F744241F-88F8-4683-BFE3-B61052FA229F]
Register today<https://www.wintellectnow.com/Account/Promo/ROME-13> for access to our high-quality on-demand training resources!

From: Daniel Fernandez <fernandez_dan2 at hotmail.com<mailto:fernandez_dan2 at hotmail.com>>
Date: Friday, March 14, 2014 at 9:13 PM
To: "ironpython-users at python.org<mailto:ironpython-users at python.org>" <ironpython-users at python.org<mailto:ironpython-users at python.org>>
Subject: [Ironpython-users] Launch ipy.exe from Host

Hi All,

I have IronPython embedded in my application to run predefined scripts. I experiment and debug a lot in the interactive environment outside of my application. I was wondering if I could launch ipy from my application and pass it my ScriptScope for debug/experimenting purposes? I know I can launch ipy from my host but I haven't figured how to pass it my scriptscope so I can play with the current objects in the scope.

Thanks

Danny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140315/1752d811/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 529A2558-817C-467F-8E7E-0789B90D675C[48].png
Type: image/png
Size: 6285 bytes
Desc: 529A2558-817C-467F-8E7E-0789B90D675C[48].png
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140315/1752d811/attachment.png>


More information about the Ironpython-users mailing list