def evaluate_inipath(path):
 if sabnzbd.WIN32:
  path = unicoder(path)
 path = os.path.normpath(os.path.abspath(path))
 inipath = os.path.join(path, DEF_INI_FILE)
 if os.path.isdir(path):
  return inipath
 elif (os.path.isfile(path) or os.path.isfile((path + '.bak'))):
  return path
 else:
  (_dirpart, name) = os.path.split(path)
  if (name.find('.') < 1):
   return inipath
  else:
   return path

def evaluate_inipath ( path ) : if sabnzbd . WIN32 : path = unicoder ( path ) path = os . path . normpath ( os . path . abspath ( path ) ) inipath = os . path . join ( path , DEF_INI_FILE ) if os . path . isdir ( path ) : return inipath elif ( os . path . isfile ( path ) or os . path . isfile ( ( path + '.bak' ) ) ) : return path else : ( _dirpart , name ) = os . path . split ( path ) if ( name . find ( '.' ) < 1 ) : return inipath else : return path
derive ini file path from a partial path .