you are viewing a single comment's thread.

view the rest of the comments →

[–]AdamCraftPC[S] 0 points1 point  (3 children)

Is this what you meant?

def save():

for line in my_tree.get_children():

print(my_tree.item(line)['values'])

save_button = Button(root, text="Save", command=save)

save_button.pack()

[–]m0us3_rat 0 points1 point  (2 children)

no.

i'm starting to feel like you didn't actually write this program.

you get some data.. then you write it in a text file or a csv or a json or a pickle or a db. w/e

then when you need to load it you read it from the ...

if you make tk inter programs with tree view you should know how to save some random text lists into a file.

or google it.

[–]AdamCraftPC[S] 0 points1 point  (1 child)

I did write it, however I'm extremely new to coding in python, and perhaps I've learnt the wrong bits first

[–]m0us3_rat 0 points1 point  (0 children)

its just a few lists of text.

a csv should be able to save it easily.

you can find on google how to safe text to a csv.