Running python from command line

Hello,

my company has given me a new workstation with much more tighter security and now much of my code does not run. Before I come to any conclusions, I would like to be able to run my code from the command line and see what the result is. Running from within the LO interface simply crashes LO completely. So if any of you great folk have an idea how i can do this, I would greatly appreciate this. Thank you.

I forgot to add that I want to run python.

It is important to know what the code actually does, because of the permissions.
But, if you have internal Python, you can try instdir/program/python, as shown here:
https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps#The_FirstUnoContact_example

Also, see “Handling Context in LibreOffice Extensions” here:

It describes how to write a Python code that works in these 3 states:

  • With APSO inside LibreOffice
  • As an extension inside LibreOffice
  • As a process outside LibreOffice