8000 GitHub - nutalk/slash_path
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nutalk/slash_path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

处理windows路径

直接复制windows路径中,字符串中包含反斜杠,一般需要改成双反斜杠或者rstr。 用slash_path,可以直接用反斜杠的windows路径,产生Path对象,更方便一些。

参考项目

主要代码参考了这个最后一个:https://discourse.techart.online/t/python-handling-windows-path-with-characters/12045/18。

安装

$ pip install slash-path

使用

from slash_path import SlashPath
path_str = 'D:\next_cloud\newfile.txt'
sp = SlashPath(path_str)

更多范例参见utest文件夹。

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0