Run a Python snippet in RunMacro
RunMacro RunnerRunMacro 3.5+
The Run Python Code command lets you insert and run a Python snippet inside your script.
Dialog & quick setup

- Add a Code › Run Python Code command.
- Enter your Python snippet in the editor.
- Use
print(...)to send output to the log. Save.
Options reference
Modes & when to use
RunMacro Runner
Best for
- Process data / complex calculations.
- Call a Python library for a special task.
- Automate logic the built-in commands do not cover.
Use an alternative when
- Do not run unreviewed Python or code requiring dependencies/interpreters unavailable to RunMacro.
Before you run
- Add Run Python Code to the macro.
- Prepare the data or target that Run Python Code will use.
Example workflow
Expected result: After execution, Run Python Code completes the described action and makes its result available to the next step.
Tips & limitations
Python must be installed and on PATH for this command to run.
The snippet runs as a separate process — it does not directly access workflow variables.
- Code uses process permissions, can modify files/network/state, and exceptions can fail the step; dependencies are not auto-installed.
Applies to RunMacro 3.5+ · RunMacro Runner · Windows 10/11
