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?