os.path.abspath(os.getcwd())
时间: 2023-11-28 16:21:50 浏览: 123
如何使用python3获取当前路径及os.path.dirname的使用
5星 · 资源好评率100%
This function returns the absolute path of the current working directory.
For example, if the current working directory is "/home/user/folder", then os.path.abspath(os.getcwd()) will return "/home/user/folder".
The os.path.abspath() function takes a path as an argument and returns the absolute path of that path. In this case, the path that is passed as an argument is the current working directory, which is obtained using the os.getcwd() function.
阅读全文