How to get the PATH environment-variable separator in Python?

前端 未结 5 870
粉色の甜心
粉色の甜心 2020-12-02 12:43

When multiple directories need to be concatenated, as in an executable search path, there is an os-dependent separator character. For Windows it\'s \';\', for

5条回答
  •  渐次进展
    2020-12-02 13:23

    Making it a little more explicit (For python newbies like me)

    import os
    print(os.pathsep)
    

提交回复
热议问题