美文网首页
python build-in os

python build-in os

作者: aaarrk | 来源:发表于2018-06-01 00:43 被阅读26次

    记录下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

          本文链接:https://www.haomeiwen.com/subject/qxthsftx.html