[英]In python, how can I test if a path is a symbolic link?
In python, how can I test if a path is a symbolic link? 在python中,如何测试路径是否为符号链接? I'm sure it has to do with the os package , but my searching of the documentation text didn't yield a result.
我确定它与os包有关 ,但我搜索文档文本并没有产生结果。 I'm using version 2.7 at the moment.
我目前正在使用2.7版本。
Close, but no cigar. 关闭,但没有雪茄。 You want the os.path module .
你想要os.path模块 。 Check out
os.path.islink()
. 查看
os.path.islink()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.