def _UploadMenu(self):
    file_path = ''
    file_path = raw_input('Enter path to file: ')

    if not file_path:
      return
    elif not os.path.isfile(file_path):
      print 'Not a valid file.'
      return

    file_name = os.path.basename(file_path)
    ext = self._GetFileExtension(file_name)

    if not ext or ext not in gdata.docs.service.SUPPORTED_FILETYPES:
      print 'File type not supported. Check the file extension.'
      return
    else:
      content_type = gdata.docs.service.SUPPORTED_FILETYPES[ext]

    title = ''
    while not title:
      title = raw_input('Enter name for document: ')

    try:
      ms = gdata.MediaSource(file_path=file_path, content_type=content_type)
    except IOError:
      print 'Problems reading file. Check permissions.'
      return

    if ext in ['CSV', 'ODS', 'XLS', 'XLSX']:
      print 'Uploading spreadsheet...'
    elif ext in ['PPT', 'PPS']:
      print 'Uploading presentation...'
    else:
      print 'Uploading word processor document...'

    entry = self.gd_client.Upload(ms, title)

    if entry:
      print 'Upload successful!'
      print 'Document now accessible at:', entry.GetAlternateLink().href
    else:
      print 'Upload error.'
Prompts that enable a user to upload a file to the Document List feed.
dataset/ETHPy150Open kuri65536/python-for-android/python-build/python-libs/gdata/samples/docs/docs_example.py/DocsSample._UploadMenu