Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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
    languagebash
    titleExample how run PowerShell Python® script code with a shebang replacement
    linenumberstrue
    @@findstr/v "^@@f.*&" "%~f0"|python.exe -&goto:eof
    
    print("Hello")
    print("world")

    Explanation:

  • Alternatively a Python® script can be executed from a file that has to be located by the executing Agent:

    Code Block
    languagebash
    titleExample how to run PowerShell Python® script code from a single line
    linenumberstrue
    python.exe hello.py

...