0
I am trying to create a window with 3 Entry, and 2 buttons, one to open a JSON and load some data into these entrys and the other button to save the changes in JSON.
Save button and Entry positions are already ok!
The problem is to open and load the JSON data as it is a array
a little long. Below my function.
def abrirArquivo(self):
data = {
"first_name": self.txtemail.get()
}
with open('name.json', 'w') as f:
json.dump(data, f, indent=4)
filename = filedialog.askopenfile(title = "Select file",filetypes = (("Json Files","*.json"),("all files","*.*")))
self.txtemail.insert(0, filename)
Do not use greetings or greetings, see what kind of behavior is expected from users?
– gleisin-dev