我真的找不到这个小问题的解决方案,我只想在PASS=True时启动循环。 当我运行程序时,它会创建目录,但不会出错
if check_dir == False:
#creates the directory
os.mkdir(dir_path)
Createdfilescounter = 0
lenght_files = len(files) - 1
kamel = False
for file in files:
if Createdfilescounter == lenght_files:
kamel = True
with open(dir_path + extend + file, "w") as f:
f.write("File saved")
while kamel:
def takess():
im = ImageGrab.grab()
im.save(dir_path+ "/" + "screenshot.png")
多亏了@ti7,我忘了增加我的计数器
相关问题 更多 >
编程相关推荐