This plugin allows you to run any Python function with no params as if it was the main function in the file.
It's very useful if you have a lot of small python utility functions and want to be able to run them quickly.
Next to each runnable function you will see run button and you can also use shortcut ctrl + alt + r
Just make sure the function has no params and name starts with "run" and then place this snippet at the end of the .py file:
import sys
globals()[sys.argv[1]]()
-
Using the IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "PyFunRun" > Install
-
Using JetBrains Marketplace:
Go to JetBrains Marketplace and install it by clicking the Install to ... button in case your IDE is running.
You can also download the latest release from JetBrains Marketplace and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
Plugin based on the IntelliJ Platform Plugin Template.