How to get the extension of a filename from the path
Tom Anderson
twic at urchin.earth.li
Fri Dec 9 05:45:50 EST 2005
On Thu, 8 Dec 2005, gene tani wrote:
> Lad wrote:
>
>> what is a way to get the the extension of a filename from the path?
>
> minor footnote: windows paths can be raw strings for os.path.split(),
> or you can escape "/"
> tho Tom's examp indicates unescaped, non-raw string works with
> splitext()
DOH. Yes, my path's got a tab in it, hasn't it!
tom
--
Women are monsters, men are clueless, everyone fights and no-one ever
wins. -- cleanskies
More information about the Python-list
mailing list