Skip to main content

How to install a python script

The following is one way to install python scripts so that the script is available through IDEA in all projects.  An alternative to these instructions is to watch the video below on how to do it.

  • Download the zip file
  • Extract the zip file to C:\Users\username\Documents\My IDEA Documents\Local Library\Macros.ILB making sure you keep the folder structure as it is needed for the script to function properly.
  • Open IDEA and select the Macros Ribbon and Bind to Ribbon
  • In the bottom right option select New Tab
  • Click on the New Tab and using the Arrow buttons on the right hand side move the Ribbon item to where you want to place it, usually this would be the last item.
  • On the New Tab click on Rename and change the name to IDEAScript as a suggestion.
  • On the New Group click on Rename and change it to the type of grouping the test belongs to, such as Extract.  As some groups might already have the same name it is recommended you might add IS to the beginning to indicate the script is from
  • Now click on New which is at the bottom of the left hand list box.
  • In the New select Python and then select an icon.  In the File name click on the ... and select the python file, generally the script would be installed here: C:\Users\username\Documents\My IDEA Documents\Local Library\Macros.ILB\IDEAScripting\Name of test.  Select the indicated Python script.
  • In the Command name rename the script.
  • Click OK
  • Select the Script from the Choose command list and select the Group it is to be installed in in the Customize the Ribbon list and then click on Add>>
  • Click on OK
  • The script now has been added.

If this is the first time running a Python script you will have to change the options.

  • Select File - Options
  • In the Options click on Enable Python integration and then agree to the notice.
  • You will then have to close and open IDEA again, you only need to do this once when you set-up Python.