import os
print(os
.getcwd
())
print(os
.path
.abspath
(os
.path
.dirname
(__file__
)))
print(os
.path
.abspath
('.'))
print(os
.path
.abspath
(__file__
))
print(os
.path
.abspath
(os
.path
.dirname
(os
.getcwd
())))
print(os
.path
.abspath
(os
.path
.dirname
(os
.path
.dirname
(__file__
))))
print(os
.path
.abspath
(os
.path
.join
(os
.getcwd
(), "..")))
print(os
.path
.abspath
(os
.path
.join
(os
.getcwd
(), "../..")))
注释
os
.getcwd
()
os
.path
.dirname
()
os
.path
.abspath
()
转载请注明原文地址: https://mac.8miu.com/read-498015.html