Help needed - To get path of a directory

Emmanuel Surleau emmanuel.surleau at
Wed Oct 13 08:33:27 CEST 2010

> Dear All,
> I want to get the absolute path of the Directory I pass explicitly. Like
> functionName("\abcd").
> I should pass the name of the directory and the function should search for
> it in the Hard drives and return me the full path of location on the drive.
> I tried using os.path, but didn't succeed.
> I am using python 2.5 on windows platform.
> It will be very kind of you if you can guide me on this.

What is your path relative to? The python file? The working directory? Can it 
be absolute? Or do you actually intend to "search for it in the hard drives" 
because you don't know where it is?



More information about the Python-list mailing list