title: python loop through files
body: <p>I have a python code that is pasted below. It works fine for what I need to do. You can notice that I load in a single dump file. How can I loop through all dump files that have the same ending pattern of *.dump and have each new file just add a new column of data to the output file? Essentially I want to add a loop so I do not have to manually re-write the code for each dump file.</p>
  
  <pre><code>from ovito.io import *
  from ovito.data import *
  from ovito.modifiers import *
  import numpy as np
  
  node = import_file("../200eV.dump",multiple_frames = True)
  
  # Perform Wigner-Seitz analysis:
  ws = WignerSeitzAnalysisModifier(
      per_type_occupancies = True, 
      eliminate_cell_deformation = True)
  ws.reference.load("../../../WS_Ref/ws.dump")
  node.modifiers.append(ws)
  
  # Define a modifier function that selects sites of type A=1 which
  # are occupied by exactly one atom of type B=2.
  def modify(frame, input, output):
  
      # Retrieve the two-dimensional Numpy array with the site occupancy numbers.
      occupancies = input.particle_properties['Occupancy'].array
  
      # Get the site types as additional input:
      site_type = input.particle_properties.particle_type.array
  
      # Calculate total occupancy of every site:
      total_occupancy = np.sum(occupancies, axis=1)
  
      # Set up a particle selection by creating the Selection property:
  
      selection1 = (site_type == 1) &amp; (occupancies[:,0] == 0) &amp; (occupancies[:,1] == 0)
  
      output.attributes['Ca_Vac'] = np.count_nonzero(selection1)
  
  
  # Insert Python modifier into the data pipeline.
  node.modifiers.append(PythonScriptModifier(function = modify))
  
  # Let OVITO do the computation and export the number of identified 
  # antisites as a function of simulation time to a text file:
  export_file(node, "defects_200.txt", "txt", 
      columns = ['Timestep', 'Ca_Vac'],
      multiple_frames = True)
  </code></pre>