import os

A = os.path.join(os.path.dirname(__file__), '..')

B = os.path.dirname(os.path.realpath(__file__))

C = os.path.abspath(os.path.dirname(__file__))

我通常只是硬连接这些实际的路径。但是这些语句在运行时决定路径是有原因的,我真的很想了解操作系统。path模块,这样我就可以开始使用它。