Is there any way to run directly python script in windows console such as Unix system?
#! /usr/bin/env python3.3
Is there any way to run directly python script in windows console such as Unix system?
#! /usr/bin/env python3.3
Or create a .BAT file that doubles as a python script:
@echo off
rem = '''
echo This is "%~f0" before Python
python -x "%~f0" %*
echo This is "%~f0" after Python
goto :end
'''
print "------------- Python code starts here --------------"
import sys
print sys.path
print sys.argv
print "------------- Python code ends here ----------------"
rem = '''
:end
rem '''
Just double clicking a file with .py
extension on Windows executes the script.