图片中的代码段:
self.DP_helpBox_årxLab = self.DPcanvas.create_text((width + 155), 45, anchor='w', font=f2, text='')
self.DP_helpBox_åryLab = self.DPcanvas.create_text((width + 155), 67, anchor='w', font=f2, text='')
画布上绘制的所有项目都选择称为“自我”。 您在gui程序中看到的两个文本字段:“År2016:41231226098”和“År2015:3093”是两个不同的标签。
代码显示了两个标签的创建:
from glob import glob
import os
with open('what_2search.txt','r') as searchlist:
keywords= searchlist
found_files = []
# You might want to change the working directory as follow if needed
os.chdir(path_where_those_files_are)
for keyword in keywords:
found_files.append(glob(keyword)) # Here is a little bug. But can easily sort this out
print(found_files) # List of files needed
问题: 在画布文本字段中编写时,数字未按预期格式化。