Given a path such as "mydir/myfile.txt"
, how do I find the file's absolute path relative to the current working directory in Python?
(给定诸如"mydir/myfile.txt"
类的路径,我如何找到相对于Python中当前工作目录的文件绝对路径?)
Eg on Windows, I might end up with: (例如在Windows上,我可能最终得到:)
"C:/example/cwd/mydir/myfile.txt"
ask by izb translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…