【Python】基础学习(一)os与sys 学习
A----内置函数dir()
print(dir())----返回内置函数
print(dir([ ]))----['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
B----python解析器对模块未知的搜索顺序 sys.path
包含输入脚本的目录(如未指定,则为当前目录)
pythonpath (目录名称列表,语法与shell变量相同path)
安装的默认路径
C----文件/目录方法os
os 模块提供了非常丰富的方法用来处理文件和目录。 https://www.runoob.com/python/os-file-methods.html
os.path() 模块主要用于获取文件的属性。---- https://www.runoob.com/python/python-os-path.html
D----sys-系统特定的参数和功能
该模块提供对解释器使用或维护的一些变量的访问,以及与解释器强烈交互的函数。它始终可用。
https://blog.csdn.net/qq_38526635/article/details/81739321