title: How to partially copy using python an Hdf5 file into a new one keeping the same structure?
body: <p>I have a large hdf5 file that looks something like this:</p>
  
  <pre><code>A/B/dataset1, dataset2
  A/C/dataset1, dataset2
  A/D/dataset1, dataset2
  A/E/dataset1, dataset2
  </code></pre>
  
  <p>...</p>
  
  <p>I want to create a new file with only that:
  A/B/dataset1, dataset2
  A/C/dataset1, dataset2</p>
  
  <p>What is the easiest way in python?</p>
  
  <p>I did:</p>
  
  <pre><code>fs = h5py.File('source.h5', 'r')
  fd = h5py.File('dest.h5', 'w')
  fs.copy('group B', fd)
  </code></pre>
  
  <p>the problem is that I get for dest.h5:</p>
  
  <pre><code>B/dataset1, dataset2
  </code></pre>
  
  <p>and that I am missing part of the arborescence.</p>