How to know a top directory?
Wojtek Walczak
gminick at bzt.bzt
Sat Aug 23 07:20:37 EDT 2008
On Sat, 23 Aug 2008 04:15:25 -0700 (PDT), Grigory Temchenko wrote:
> Help me please. How to know a top directory? I mean I have path "/this/
> is/path" and I wanna get "/this/is".
> Also I want to use it as platform independent. If I want to pass "c:
> \that\path" then I need to get "c:\that".
>
> Does anyone have ideas?
Read about os.path module. It's all in there:
http://docs.python.org/lib/module-os.path.html
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
More information about the Python-list
mailing list