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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -