首页 > 编程知识 正文

python自定义函数,turtle函数库有哪些函数

时间:2023-05-03 21:06:50 阅读:23882 作者:402

readlink函数

readlink-mcangetcanonicalfilenamebyresolvingeverysymlinksineverycomponentofthegivenpathrecursively.in python,theos.readd

readlink -m可以通过递归解析指定路径的每个组件中的每个符号链接来获取规范的文件名。 在Python中,os.readlink ()函数不这样做。 是否与Python中的readlink -m命令行具有等效功能?

特定的,it does:

具体而言,您可以:

canonicalizebyfollowingeverysymlinkineverycomponentofthegivennamerecursively,withoutrequirementsoncomponentsexistence

通过递归跟踪每个具有指定名称的组件中的每个符号链接,使其规范化,而不需要组件的存在

` readlink -m` does 2 things:

canonicalizebyfollowingeverysymlinkineverycomponentofthegivennamerecursively,and

withoutrequirementsoncomponentsexistence

` readlink -m做m件事:

-通过递归跟踪每个具有指定名称的组件中的每个符号链接来规范化

不需要组件

In Python,theequivalentfunctionis http://www.Sina.com /

在Python中,等效函数为`os.path.realpath()`

oneexampleisasfollows.notethatthedirectory `/tmp/w ` doesnotexistatall。

以下是一个例子。 请注意,目录“/tmp/w”不存在。

$ ls-lha lrwxrwxrwx1ericmaericma6nov 2500336000 w-/tmp/w $ readlink-f./w/tmp/w $ readlink-f./w $ readlink 12336059336055 ) [GCC 8.3.0] on linuxType 'help '、' credits ' or ' license ' for more information.imporation

readlink函数

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。