parameters: (self, editor_file, file_name)
return_statement: return result
docstring: Locate <code>file_name</code> file that relates to <code>editor_file</code>.
  		File name may be absolute or relative path
  		
  		@type editor_file: str
  		@type file_name: str
  		@return String or None if <code>file_name</code> cannot be located
docstring_summary: Locate <code>file_name</code> file that relates to <code>editor_file</code>.
  		File name may be absolute or relative path
docstring_tokens: Locate <code > file_name< / code > file that relates to <code > editor_file< / code > . File name may be absolute or relative path
function: def locate_file(self, editor_file, file_name):
  		"""
  		Locate <code>file_name</code> file that relates to <code>editor_file</code>.
  		File name may be absolute or relative path
  		
  		@type editor_file: str
  		@type file_name: str
  		@return String or None if <code>file_name</code> cannot be located
  		"""
  		if is_url(file_name):
  			return file_name
  
  		result = None
  		
  		previous_parent = ''
  		parent = os.path.dirname(editor_file)
  		while parent and os.path.exists(parent) and parent != previous_parent:
  			tmp = self.create_path(parent, file_name)
  			if os.path.exists(tmp):
  				result = tmp
  				break
  			
  			previous_parent = parent
  			parent = os.path.dirname(parent)
  		
  		return result
function_tokens: def locate_file ( self , editor_file , file_name ) : if is_url ( file_name ) : return file_name result = None previous_parent = '' parent = os . path . dirname ( editor_file ) while parent and os . path . exists ( parent ) and parent != previous_parent : tmp = self . create_path ( parent , file_name ) if os . path . exists ( tmp ) : result = tmp break previous_parent = parent parent = os . path . dirname ( parent ) return result