#NEWLINE# def _create_local( self , f ) : #NEWLINE# #INDENT# 'Create the file name as a locally valid version.\n\n        Uses the "local_path" and "remote_path" options.\n        ' #NEWLINE# ret = f #NEWLINE# if vdebug . opts . Options . isset ( 'path_maps' ) : #NEWLINE# #INDENT# sorted_path_maps = sorted ( vdebug . opts . Options . get ( 'path_maps' , dict ) . iteritems ( ) , key = ( lambda l : len ( l [ 0 ] ) ) , reverse = True ) #NEWLINE# for ( remote , local ) in sorted_path_maps : #NEWLINE# #INDENT# if ( remote in ret ) : #NEWLINE# #INDENT# vdebug . log . Log ( ( ( 'Replacing remote path (%s) ' % remote ) + ( 'with local path (%s)' % local ) ) , vdebug . log . Logger . DEBUG ) #NEWLINE# ret = ret . replace ( remote , local , 1 ) #NEWLINE# local_sep = self . _findSeparator ( local ) #NEWLINE# remote_sep = self . _findSeparator ( remote ) #NEWLINE# if ( local_sep and remote and ( remote_sep != local_sep ) ) : #NEWLINE# #INDENT# ret = ret . replace ( remote_sep , local_sep ) #NEWLINE# #UNINDENT# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ret