10.4 os.path模块
os.path模块的作用:用于获取文件的属性信息
导入模块:
import os.path
import os.path as p
from os import path
[‘all’, ‘builtins’, ‘cached’, ‘doc’, ‘file’, ‘loader’, ‘name’, ‘package’, ‘spec’, ‘abspath_fallback’,
‘get_bothseps’, ‘getfinalpathname’, ‘getfinalpathname_nonstrict’, ‘getfullpathname’,
‘getvolumepathname’, ‘nt_readlink’, ‘readlink_deep’, ‘abspath’, ‘altsep’, ‘basename’, ‘commonpath’,
‘commonprefix’, ‘curdir’, ‘defpath’, ‘devnull’, ‘dirname’, ‘exists’, ‘expanduser’, ‘expandvars’, ‘extsep’,
‘genericpath’, ‘getatime’, ‘getctime’, ‘getmtime’, ‘getsize’, ‘isabs’, ‘isdir’, ‘isfile’, ‘islink’, ‘ismount’,
‘join’, ‘lexists’, ‘normcase’, ‘normpath’, ‘os’, ‘pardir’, ‘pathsep’, ‘realpath’, ‘relpath’, ‘samefile’,
‘sameopenfile’, ‘samestat’, ‘sep’, ‘split’, ‘splitdrive’, ‘splitext’, ‘stat’, ‘supports_unicode_filenames’,
‘sys’]
abspath(相对路径) ----------------- 返回的路径的