Skip to main content

Build an IDEASCRIPT executable including python script

Hi,
I would like to create an .exe file from a macro I created which integrates a python script. My problem is that when I build the executable file and try to run it on another machine (without importing the pyhton script) it doesn't work.
Is there a way to create an executable which already integrates the python code, so that the final user does not have to receive also the .py script?
Also, is it possible to create an executable which doesn't require to be included in the 'Macros' folder of the IDEA project?
Thank you, Ttx

Brian Element Tue, 10/02/2018 - 18:52

Hello totux,

There is currently no way that I know of to integrate a python script within an IDEAScript exe file.  Some options would be to create a zip file of the exe file along with the python code.  Another option which is a bit more complicated is to have the IDEAScript create the python script by have it write the file.

The exe file should be able to run any where on your computer, it doesn't need to be in the macros folder, I just tried running an exe file on the desktop with no problems.

Thanks

Brian

totux Wed, 10/03/2018 - 03:38

Thank you, Brian!
My main need is to obfuscate the python code in order to distribute it properly. I was wondering how this is performed in the plugins that the IDEA Lab section of this website offers (I am assuming that complex addons like the outlier detection one are written in Pyhton).
Thank you again and have a good day.
totux

Brian Element Wed, 10/03/2018 - 07:40

In reply to by totux

One way you can do it if your python skills are up to it is to create the entire script in Python by accessing the IDEA object and not use IDEAScript at all.  Then you can create an executable Python application.  You would then run the Python app that would access the IDEA object and perform your analysis.