Having XSCRIPTCONTEXT in IDE's python interpreter

When I open APSO’s python terminal I get right into the “script environment” (I don’t know the correct technical terms, sorry about that), so for example i can run the line ctx = XSCRIPTCONTEXT.getComponentContext().

Conversely, if in APSO i choose to modify a script with my IDE (Thonny, in this case), the python terminal i open in that program doesn’t inherit the scripting environment, so ctx = XSCRIPTCONTEXT.getComponentContext() returns an exception.

Is there a simple way to have my IDE instance of python be into the correct scripting environment?

Hi,

I don’t know if Thonny is offering the possibility to configure an alternative Python shell.

  • If it does, please do so mentioning libO python.exe, assuming you’re using Windows.
  • if not Python IDE Basics in TDF wiki is suggesting IDEs that offer such a facility.

Hi,

With Apso comes a example of how to pass the current context to the ‘console’ function. See My Macros → apso.oxt → tools → console.

Regards