sys.argv 命令行参数List,第一个元素是程序本身路径 以列表表示
import sys print(sys.argv) [‘C:/Users/Administrator.QH-20170325TNQR/PycharmProjects/SS/day5/sys mod.py‘]
sys.path 返回模块的搜索路径,初始化时使用PYTHONPATH环境变量的值
[‘C:\\Users\\Administrator.QH-20170325TNQR\\PycharmProjects\\SS\\day5‘, ‘C:\\Users\\Administrator.QH-20170325TNQR\\PycharmProjects\\SS‘, ‘C:\\Users\\Administrator.QH-20170325TNQR\\AppData\\Local\\Programs\\Python\\Python36\\python36.zip‘, ‘C:\\Users\\Administrator.QH-20170325TNQR\\AppData\\Local\\Programs\\Python\\Python36\\DLLs‘, ‘C:\\Users\\Administrator.QH-20170325TNQR\\AppData\\Local\\Programs\\Python\\Python36\\lib‘, ‘C:\\Users\\Administrator.QH-20170325TNQR\\AppData\\Local\\Programs\\Python\\Python36‘, ‘C:\\Users\\Administrator.QH-20170325TNQR\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages‘]
sys.version 获取Python解释程序的版本信息
3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)]
sys.platform 返回操作系统平台名称
win32