Relative paths in Python

#For accessing the file inside a sibling folder.
filename = os.path.join(fileDir, './Folder2/same.txt')
filename = os.path.abspath(os.path.realpath(filename))
print filename
readFile(filename)
原文地址:https://www.cnblogs.com/dreamafar/p/6203035.html