@echo off rem=""" if "%OS%" == "Windows_NT" goto WinNT python -x "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofpython :WinNT python -x "%0" %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofpython if %errorlevel% == 9009 echo ERROR: You do not have Python in your PATH. goto endofpython rem """ # python script starts here #!python # -*- mode: python; Encoding: utf-8; coding: utf-8 -*- print("Hello. I am python.") # end of python script rem=""" :endofpython rem """