#NEWLINE# def join( self , path , * paths ) : #NEWLINE# #INDENT# 'Join *paths* onto *path* (which may be a URI)' #NEWLINE# all_paths = ( ( path , ) + paths ) #NEWLINE# for i in range ( len ( all_paths ) , 0 , ( - 1 ) ) : #NEWLINE# #INDENT# if is_uri ( all_paths [ ( i - 1 ) ] ) : #NEWLINE# #INDENT# ( scheme , netloc , uri_path ) = urlparse ( all_paths [ ( i - 1 ) ] ) [ : 3 ] #NEWLINE# return ( '%s://%s%s' % ( scheme , netloc , posixpath . join ( ( uri_path or '/' ) , * all_paths [ i : ] ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return os . path . join ( * all_paths )