def _absolute_path(path, relative_to=None):
 if (path and os.path.isabs(path)):
  return path
 if (path and (relative_to is not None)):
  _abspath = os.path.join(relative_to, path)
  if os.path.isfile(_abspath):
   log.debug("Relative path '{0}' converted to existing absolute path '{1}'".format(path, _abspath))
   return _abspath
 return path

def _absolute_path ( path , relative_to = None ) : if ( path and os . path . isabs ( path ) ) : return path if ( path and ( relative_to is not None ) ) : _abspath = os . path . join ( relative_to , path ) if os . path . isfile ( _abspath ) : log . debug ( "Relative path '{0}' converted to existing absolute path '{1}'" . format ( path , _abspath ) ) return _abspath return path
return an absolute path .