code: def loadfile(args):
      '''load a log file (path given by arg)'''
      mestate.console.write("Loading %s...\n" % args)
      t0 = time.time()
      mlog = mavutil.mavlink_connection(args, notimestamps=False,
                                        zero_time_base=False,
                                        progress_callback=progress_bar)
      mestate.filename = args
      mestate.mlog = mlog
      mestate.status.msgs = mlog.messages
      t1 = time.time()
      mestate.console.write("\ndone (%u messages in %.1fs)\n" % (mestate.mlog._count, t1-t0))
  
      global flightmodes
      flightmodes = mlog.flightmode_list()
  
      load_graphs()
      setup_menus(f loadfile(args):
      '''load a log file (path given by arg)'''
      mestate.console.write("Loading %s...\n" % args)
      t0 = time.time()
      mlog = mavutil.mavlink_connection(args, notimestamps=False,
                                        zero_time_base=False,
                                        progress_callback=progress_bar)
      mestate.filename = args
      mestate.mlog = mlog
      mestate.status.msgs = mlog.messages
      t1 = time.time()
      mestate.console.write("\ndone (%u messages in %.1fs)\n" % (mestate.mlog._count, t1-t0))
  
      global flightmodes
      flightmodes = mlog.flightmode_list()
  
      load_graphs()
      setup_menus()
docs: load a log file (path given by arg)