import ospath1 = os.getcwd()# 或者path2 = os.path.dirname( os.path.realpath(__file__))print(path1)print(path2)