A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/091764.html below:

How to extract the file names???

How to extract the file names??? How to extract the file names???David Fuess fuess1 at home.com
Fri Apr 20 08:28:13 EDT 2001
Look at os.path.split. It does exactly what you want.

Dave


On Thu, 19 Apr 2001 15:26:10 -0700, "EdwardT" <edwardt at trillium.com>
wrote:

>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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4