Reputation: 21
Directory: C:\Users\User\Documents
20.jpg 77fg45174161873c84172b66ba4
I would like to place the results above within the canvas widget where I have placed the text "MD5 File Hashes", the following is being placed within the centerLabel
panel. However, it needs to be placed within the canvas.
The following code is fully functioning, but not displaying it with the results intended:
Label['text'] = output
canvas.itemconfig(canvas_id, text="Hashes")
Upvotes: 0
Views: 59
Reputation: 15335
Replace:
canvas.itemconfig(canvas_id, text="MD5 File Hashes")
with:
canvas.itemconfig(canvas_id, text=output)
if you want to display rootDir
as well you can instead replace with:
canvas.itemconfig(canvas_id, text="Directory: {}\n{}".format(rootDir, output))
The output
you have is a string:
>>>type(output)
<class 'str'>
So you can easily put it on as any place that accepts strings, such as print(output)
and canvas.itemconfig(canvas_id, text=output)
.
Upvotes: 1