def main():
  # Parse command line options
  try:
    opts, args = getopt.getopt(sys.argv[1:], '', ['consumer_key=',
                                                  'consumer_secret='])
  except getopt.error, msg:
    print ('python oauth_example.py --consumer_key [oauth_consumer_key] '
           '--consumer_secret [consumer_secret] ')
    sys.exit(2)

  consumer_key = ''
  consumer_secret = ''
  # Process options
  for option, arg in opts:
    if option == '--consumer_key':
      consumer_key = arg
    elif option == '--consumer_secret':
      consumer_secret = arg

  while not consumer_key:
    consumer_key = raw_input('Please enter consumer key: ')
  while not consumer_secret:
    consumer_secret = raw_input('Please enter consumer secret: ')

  sample = OAuthSample(consumer_key, consumer_secret)
  sample.Run()
Demonstrates usage of OAuth authentication mode.
dataset/ETHPy150Open kuri65536/python-for-android/python-build/python-libs/gdata/samples/oauth/oauth_example.py/main