""" 模块:python3 sysModule.py 功能:python3 sys 模块。 参考:https://www.runoob.com/python3/python3-module.html 知识点: 1.sys 模块。 sys 模块内置在每一个 Python 解析器中。 sys.argv 是一个包含命令行参数的列表。 sys.path 包含了一个 Python 解释器自动查找所需模块的路径的列表。 2.命令行(交互模式)占位符(position symbol): sys.ps1 定义了主提示符 '>>> '。 sys.ps2 定义了副提示符 '... '。 """ import sys print(sys.argv) # ['F:/Gaoshengjie/cs2.py'] print(sys.path) # ['F:\\Gaoshengjie', 'F:\\Gaoshengjie', # 'D:\\Program Files\\JetBrains\\PyCharm 2019.1.1\\helpers\\pycharm_display', # 'D:\\Program Files\\python36\\python36.zip', # 'D:\\Program Files\\python36\\DLLs', # 'D:\\Program Files\\python36\\lib', # 'D:\\Program Files\\python36', # 'D:\\Program Files\\python36\\lib\\site-packages', # 'D:\\Program Files\\JetBrains\\PyCharm 2019.1.1\\helpers\\pycharm_matplotlib_backend']
python3 sysModule.py
猜你喜欢
转载自blog.csdn.net/weixin_42193179/article/details/105737440
今日推荐
周排行