code: def main():
    
    if len(sys.argv) < 2:
      sys.stderr.write('Usage: run_flatc.py flatbuffers_dir [flatc_args]\n')
      return 1
    cwd = os.getcwd()
    flatc = ''
    flatbuffers_dir = sys.argv[1]
    for path in FLATC_SEARCH_PATHS:
      current = os.path.join(flatbuffers_dir, path,
                             'flatc' + EXECUTABLE_EXTENSION)
      if os.path.exists(current):
        flatc = current
        break
    if not flatc:
      sys.stderr.write('flatc not found\n')
      return 1
    command = [flatc] + sys.argv[2:]
    return subprocess.call(command)
docs: Script that finds and runs flatc built from source.