RE Despair - help required
Yoav
yoav_artzi at il.vio.com
Thu Aug 25 11:21:35 EDT 2005
Thank you all guys. It seems like the simpler the solution, the more I
am happy about it. Sorry, for the simple question, I am quite new to
this lang.
Cheers.
Robert Kern wrote:
> Yoav wrote:
>
>>Don't think it will do much good. I need to get them from a file and
>>extract the last folder in the path. For example:
>>if I get "c:\dos\util"
>>I want to extract the string "\util"
>
>
> You mean like this:
>
> import os
> os.path.sep + os.path.split(r"c:\dos\util")[-1]
>
More information about the Python-list
mailing list