def BuildUri(uri, url_params=None, escape_params=True):
 parameter_list = DictionaryToParamList(url_params, escape_params)
 if parameter_list:
  if (uri.find('?') != (-1)):
   full_uri = '&'.join(([uri] + parameter_list))
  else:
   full_uri = ('%s%s' % (uri, ('?%s' % '&'.join(([] + parameter_list)))))
 else:
  full_uri = uri
 return full_uri

def BuildUri ( uri , url_params = None , escape_params = True ) : parameter_list = DictionaryToParamList ( url_params , escape_params ) if parameter_list : if ( uri . find ( '?' ) != ( - 1 ) ) : full_uri = '&' . join ( ( [ uri ] + parameter_list ) ) else : full_uri = ( '%s%s' % ( uri , ( '?%s' % '&' . join ( ( [ ] + parameter_list ) ) ) ) ) else : full_uri = uri return full_uri
converts a uri string and a collection of parameters into a uri .