Help needed - To get path of a directory

Bishwarup Banerjee bishwarup.banerjee at gmail.com
Wed Oct 13 05:05:37 EDT 2010


Dear Emmanuel,

Thank you for your reply.
Actually what I want to do is, at the run time I want to know the location
of a specific directory.
Then I will add some file name to the path and load the file.
The directory can reside in any drive, depending on the user.

With Warm Regards,


On Wed, Oct 13, 2010 at 12:03 PM, Emmanuel Surleau <
emmanuel.surleau at gmail.com> wrote:

> > 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?
>
> Cheers,
>
> Emm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101013/cd8d8717/attachment-0001.html>


More information about the Python-list mailing list