Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.244

Running Python scripts in winIDEA

In this topic:

Running a script via winIDEA

 

 

Introduction

Python scripts can be executed as a child process of winIDEA. They launch in new console window as new instance of Python interpreter. There can be more than one script executed in batch mode at the same time. winIDEA doesn't interact with these processes, except when we exit winIDEA, when it terminates all of them.

 

 

Running a script via winIDEA

number1

(optional) Modify the script according to the required configuration.

 

number2

Save it in the same folder as winIDEA workspace.

 

number3

Start Debug session

Debug status must be STOP.

 

Number4

Select your Python script in Tools / External Scripts.

The script will execute the required operation.

 

Cypress-flash

 

 

 

Running script commands

tools_menu_script

 

Run Script [F6] - Starts Python script in batch mode. This mode is useful for background tasks, for example read value of variable on a target and log it to file.

Run Script and Wait [Ctrl + F6] - After executing a script, the new console window does not disappear after the script ends but remains open thus leaving access to the current state of Python interpreter in interactive mode.

Stop Script - Terminates scripts started in batch mode. Set focus to the console window running the script and press [Ctrl + Break]. In interactive mode press [Ctrl + Z] to terminate the script.

External Scripts - Quick access to all Python scripts saved in the same folder as the workspace.

 

 

 

i-icon

Using a keyboard shortcut to run a shortcut script.

 

 

Running scripts from other tools

Scripts using winIDEA SDK module can be run from system command prompt, Continuous Integration tool, or from  third party IDE, for example Eclipse with PyDev plug-in.

Scripts ran in winIDEA always connect to that instance of winIDEA. When a script is started from another tool, then the script starts and connects to a winIDEA instance, depending on the connection method used in the script. Read more about connection methods...

 

Copyright © 2024 TASKING Germany GmbH