@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 '''
在Windows上双击扩展名为
.py
的文件就可以执行脚本。在如果使用pythongui+命令行,则可以运行任何
.py
文件。在http://www.python.org/download/releases/3.3.2/#download
或者创建一个兼作python脚本的.BAT文件:
相关问题 更多 >
编程相关推荐