def fly():
 args = parse_arguments()
 try:
  proxy_connect(args)
  init(args)
 except TwitterHTTPError as e:
  printNicely('')
  printNicely(magenta('We have connection problem with twitter REST API right now :('))
  detail_twitter_error(e)
  save_history()
  sys.exit()
 except (socks.ProxyConnectionError, URLError):
  printNicely(magenta('There seems to be a connection problem.'))
  printNicely(magenta('You might want to check your proxy settings (host, port and type)!'))
  save_history()
  sys.exit()
 target = args.stream.split()[0]
 if (target == 'mine'):
  spawn_personal_stream(args)
 else:
  try:
   stuff = args.stream.split()[1]
  except:
   stuff = None
  spawn_dict = {'public': spawn_public_stream, 'list': spawn_list_stream}
  spawn_dict.get(target)(args, stuff)
 time.sleep(0.5)
 g['reset'] = True
 g['prefix'] = True
 listen()

def fly ( ) : args = parse_arguments ( ) try : proxy_connect ( args ) init ( args ) except TwitterHTTPError as e : printNicely ( '' ) printNicely ( magenta ( 'We have connection problem with twitter REST API right now :(' ) ) detail_twitter_error ( e ) save_history ( ) sys . exit ( ) except ( socks . ProxyConnectionError , URLError ) : printNicely ( magenta ( 'There seems to be a connection problem.' ) ) printNicely ( magenta ( 'You might want to check your proxy settings (host, port and type)!' ) ) save_history ( ) sys . exit ( ) target = args . stream . split ( ) [ 0 ] if ( target == 'mine' ) : spawn_personal_stream ( args ) else : try : stuff = args . stream . split ( ) [ 1 ] except : stuff = None spawn_dict = { 'public' : spawn_public_stream , 'list' : spawn_list_stream } spawn_dict . get ( target ) ( args , stuff ) time . sleep ( 0.5 ) g [ 'reset' ] = True g [ 'prefix' ] = True listen ( )
main function .