Page History
...
- Find examples for download (.json upload): pdScriptingPythonWindows.workflow.json
In order to directly run Python® script code from a JS7 shell job script the recommended approach is to use a shebang replacement like this:
Code Block language bash title Example how run Python® script code with a shebang replacement linenumbers true @@setlocal enabledelayedexpansion & @@findstr/v "^@@f^@@[fs].*&" "%~f0" | python.exe -&goto:eof & exit !errorlevel!/b& print("Hello") print("world")
Explanation:
- Credits for the shebang replacement to How to run a PowerShell script within a Windows batch file
- If you consider this shebang replacement somewhat cryptic then add it to JS7 - Script Includes which are easily referenced from shell jobs, e.g. by using
##!include python
- The
python.exe
executable is available when Python® is installed for Windows.
...
Overview
Content Tools