#####################
python 獲取當前運行的 class 和 方法的名字 方法內部獲取方法名: sys._getframe().f_code.co_name 類內部獲取類名 self.__class__.__name__
#######################
print(os.path.abspath(__file__)) # 獲取當前文件的絕對路徑,包含文件名 print(os.path.dirname(os.path.abspath(__file__))) # 獲取當前文件父級路徑 print(os.path.basename(os.path.abspath(__file__))) # 只有包含文件名 print(os.path.exists(r'D:\AI\python_workspace\python-base')) # 如果這個路徑存在就返回True,這個有用,如果沒有就可以創建了,
########################
