python 模块之-sys

python 模块 sys

import sys

sys.argv       # 参数,第一个参数是脚本的文件明,自定义参数为数组的第二个   sys.argv[1]

sys.version   #  python的版本

sys.path     # 返回模块路径

sys.exit(n)  # 退出程序,返回n

sys.platform   #返回系统的名称

sys.stdout.write(r'please')   # 系统标准输出

猜你喜欢

转载自www.cnblogs.com/kuku0223/p/8965245.html