tkinter - How to get specific address from file upload dialog python -
i trying select file using file upload dialog using code
def buttonclick(): self.label = label(master,text=askopenfilename(filetypes=(("android application files", ".apk"), ("all files", "*.*")))) self.label.grid() self.upbutton.destroy()
complete address of file want name , extension in selection highlighted in picture
guide me ,anyone?
you can use os.path.basename. example, if path = /a/b/c.apk
, os.path.basename(path)
returns c.apk
Comments
Post a Comment