I have this code:
filename = tkFileDialog.askopenfilename(initialdir="lists/custom/", filetypes=(("Word list",
"*.tldr"), ("All files", "*.*")))
If I had a file called “dog.tldr”, is there a way to get only the file name of it instead of having a directory in front of it? Right now filename outputs something like
/dir/blah/dog.tldr
But I only want the dog.tldr. Is there a way?
Thanks.
os.path.split: