code: def ptconcat(output_file, input_files, overwrite=False):
      
      filt = tb.Filters(
          complevel=5, shuffle=True, fletcher32=True, complib='zlib'
      )
      out_tabs = {}
      dt_file = input_files[0]
      log.info("Reading data struct '%s'..." % dt_file)
      h5struc = tb.open_file(dt_file, 'r')
      log.info("Opening output file '%s'..." % output_file)
      if overwrite:
          outmode = 'w'
      else:
          outmode = 'a'
      h5out = tb.open_file(output_file, outmode)
  
      for node in h5struc.walk_nodes('/', classname='Table'):
          path = node._v_pathname
          log.debug(path)
          dtype = node.dtype
          p, n = os.path.split(path)
          out_tabs[path] = h5out.create_table(
              p, n, description=dtype, filters=filt, createparents=True
          )
      h5struc.close()
      for fname in input_files:
          log.info('Reading %s...' % fname)
          h5 = tb.open_file(fname)
          for path, out in out_tabs.items():
              tab = h5.get_node(path)
              out.append(tab[:])
          h5.close()
      h5out.close()
docs: Concatenate HDF5 Files