def expandName(fn):
# Many of the files we'll be testing are executables, and therefore
# looked up on the path. Try to look it up there (use the shell).
# Note: This uses a deprecated interface, but boy is it handy.
# If the returned status is non-zero, the lookup did not succeed.
(status, result) = subprocess.getstatusoutput('which ' + fn)
if status == 0:
fn = result
# The file may be a link, or the path may contain one...
return os.path.realpath(fn)
validity_thorough_unused.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录