Asked:2020-01-27 16:19:43 +0000 UTC2020-01-27 16:19:43 +0000 UTC2020-01-27 16:19:43 +0000 UTC
问题检查文件是否存在[关闭]
772
def __init__(self):
self.csvfile = input("Enter the name of .csv file : ")
if not os.path.exists(self.csvfile):
print("File doesn't exist")
self.__init__()
CWD 原来是一个更高级别的分支,因为该文件不在可见区域中。
检查:从操作系统导入getcwd