def generate_authorize_url(self, redirect_uri='urn:ietf:wg:oauth:2.0:oob',
                             response_type='code', access_type='offline',
                             approval_prompt='auto', **kwargs):
    self.redirect_uri = redirect_uri
    query = {
      'response_type': response_type,
      'client_id': self.client_id,
      'redirect_uri': redirect_uri,
      'scope': self.scope,
      'approval_prompt': approval_prompt,
      'access_type': access_type
      }
    query.update(kwargs)
    parts = list(urlparse.urlparse(self.auth_uri))
    query.update(dict(parse_qsl(parts[4]))) # 4 is the index of the query part
    parts[4] = urllib.urlencode(query)
    return urlparse.urlunparse(parts)
Set the stretch factor for the widget.
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py/OAuth2Token.generate_authorize_url--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/wx/wx_split_item.py/wxSplitItem.SetStretch