#NEWLINE# def testRelpathto( ) : #NEWLINE# #INDENT# thedir = '//toplevel/dirone/dirtwo/dirthree' #NEWLINE# thelist = [ ( 'file1.html' , 'file2.html' ) , ( 'file1.html' , '../file2.html' ) , ( '../file1.html' , '../file2.html' ) , ( '../file1.html' , 'file2.html' ) , ( '../fish1/fish2/' , '../../sub1/sub2/' ) , ( '../fish1/fish2/' , 'sub1/sub2' ) , ( '../../../fish1/fish2/' , 'sub1/sub2/' ) , ( '../../../fish1/fish2/' , 'sub1/sub2/file1.html' ) ] #NEWLINE# for ( orig , dest ) in thelist : #NEWLINE# #INDENT# print ( ( '(%s, %s)      : ' % ( orig , thelist ) ) , relpathto ( thedir , orig , dest ) )