self.file=tkinter.filedialog.askopenfilename(initialdir="~",title="Select a File",filetypes=(("BasketBall Match","*.bbm"),("all files","*.*")))
self.root.title(self.file)
# sauvegarde du fichier
ifself.file=='untitled.bbm'andself.file=='':
self.file=tkinter.filedialog.asksaveasfilename(initialdir="~",title="Select a File",filetypes=(("BasketBall Match","*.bbm"),("all files","*.*")))
withopen(self.file,'a')asf:
f.write(self.temp_data)
self.temp_data=''
self.root.title(self.file)
defbrowse_open(self,*event):
print('open')
self.file=tkinter.filedialog.askopenfilename(initialdir="~",title="Select a File",filetypes=(("BasketBall Match","*.bbm"),("all files","*.*")))
# ouvre un fichier
self.file=tkinter.filedialog.askopenfilename(initialdir="~/Documents/python/basket",title="Select a File",filetypes=(("BasketBall Match","*.bbm"),("all files","*.*")))