spacepaste

  1.  
  2. import gdata.docs.data
  3. import gdata.docs.client
  4. import gdata.docs.service
  5. import gdata.spreadsheet.service
  6. import getpass
  7. user = raw_input('Please enter your username: ')
  8. pw = getpass.getpass()
  9. source = ' '
  10. gd_client = gdata.docs.service.DocsService()
  11. gd_client.ClientLogin(user, pw, source=source)
  12. #I need to get the exported html file here
  13. file_path = raw_input('enter path to file: ')
  14. title = raw_input('please enter name of the report: ')
  15. content_type = gdata.docs.service.SUPPORTED_FILETYPES['HTML']
  16. ms = gdata.MediaSource(file_path=file_path, content_type=content_type)
  17. entry = gd_client.Upload(ms, title)
  18.