Hi moparthi,

This thread should have the answer:
http://groups.google.com/group/google-appengine/browse_thread/thread/10d8d67cbf6ba709

Cheers,

Jeff

On Sep 16, 4:41 am, moparthi <[EMAIL PROTECTED]> wrote:
> hi,
>
> I'm facing problem while trying to UpgradeToSessionToken().
> I may be wrong somewhere. Could u plz inform me where I mistaken and
> solve this problem.
> My program as follows :
>
> try:
>   from xml.etree import ElementTree
> except ImportError:
>   from elementtree import ElementTree
> import gdata.alt.appengine
> import gdata.calendar.service
> import gdata.service
> import atom.service
> import atom
> import getopt
> import sys
> import string
> import cgi, sys
> import cgitb; cgitb.enable()  # for troubleshooting
> import time
>
> class CalendarExample:
>
>   def __init__(self):
>     print ""
>
>   def GetAuthSubUrl(self):
>     next = 'http://localhost:8080/'
>     scope = 'http://www.google.com/calendar/feeds/'
>     secure = False
>     session = True
>     self.calendar_service = gdata.calendar.service.CalendarService()
>     return self.calendar_service.GenerateAuthSubURL(next, scope,
> secure, session)
>
>   def _retrievecals(self):
>     parameters = cgi.FieldStorage()
>     print '<br/> Parameters is %s ' % (parameters,)
>     return parameters
>
>   def _login(self):
>     authSubUrl = self.GetAuthSubUrl()
>     print '<a href="%s">Login to your Google account</a>' % authSubUrl
>     value=self._retrievecals()
>     if value is not '':
>       print '<br/>In Login Parameters is %s' %(value,)
>       calendar_service = gdata.calendar.service.CalendarService()
>       calendar_service.auth_token = value
>       calendar_service.UpgradeToSessionToken()
> ##      feed = calendar_service.GetCalendarListFeed()
> ##      for i, a_calendar in enumerate(feed.entry):
> ##        print '\t%s. %s' % (i, a_calendar.title.text,)
>
> def main():
>   sample = CalendarExample()
>   sample._login()
>
> if __name__ == '__main__':
> #  print '\n Main If condition'
>   main()
>
> regards,
> moparthi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to