赞
踩
【python常用option】
1. -c cmd : program passed in as string (terminates option list)
解析字符串命令,不读cmd之后的option
2. -i : inspect interactively after running script; forces a prompt even
if stdin does not appear to be a terminal; also PYTHONINSPECT=x
运行完输入脚本后,进入交互模式,通常用于自己检测状态
3. -m mod : run library module as a script (terminates option list)
执行模块,mod不包含.py后缀只要名字,不读mod之后的option,当作module的输入参数
4. -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x
优化生成的pyc
5. -OO : remove doc-strings in addition to the -O optimizations
在-O的基础上去除doc_strings,让ELF/EXE/Mach-O变小
6. -V : print the Python version number and exit (also --version)
输出版本号
7. -S : don't imply 'import site' on initialization
不会自动 import site
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。