How to extract the file names???

EdwardT edwardt at trillium.com
Thu Apr 19 18:26:10 EDT 2001


Hi currently I have the following code that asks the user for input file
names, but it returns the filesname with the full path attaching to it. ButI
just want the filenames without the fullpath how can i do it??

inputName = askopenfilename(filetypes=["{Test Log Files} {*}"])

e.g it will gives me:
/vobs/qa/stf/ctf/src/sample/tpu/log/tpTcCTFTEST7/tp_acc.1

But I just want tp_acc.1  . what should I do??
The file name and the ful path are not known until run time.
Ps as you notice askopenfilename also display the filename with the full
path which is very long.. ho can  cut it back also?

Thanks






More information about the Python-list mailing list