Tekkaman

导航

 

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

 

posted on 2013-09-28 16:22  Tekkaman  阅读(2890)  评论(0编辑  收藏  举报