Finding the relative path of a file from a dir

Suresh Jeevanandam jm.suresh at gmail.com
Fri Jan 20 07:26:53 EST 2006


Hi,
	a = '/home/suresh/doc/html/a1/'
	b = '/home/suresh/doc/'

I am looking for a standard function which will return the location of b 
relative to a i.e. '../..'

	I have gone through the os and os.path modules, but could not find any 
function of use. Should I write my own?

Thanks in advance,
Suresh



More information about the Python-list mailing list