python build-in os

记录下os库中几个方法
os.curdir
The constant string used by the operating system to refer to the current directory. This is '.' for Windows and POSIX. Also available viaos.path
文档中原文如上,大致翻译如下:
常量字符串os.curdir被用来获取当前的目录。

os.sep
The character used by the operating system to separate pathname components. This is '/' for POSIX and '\\' for Windows. Note that knowing this is not sufficient to be able to parse or concatenate pathnames — use os.path.split() and os.path.join() — but it is occasionally useful. Also available via os.path
拼接路径中的符号

你可能感兴趣的:(python build-in os)