title: Reading Repeating Groups in Custom Messages using Python Quickfix
body: <p>I am trying to read from a FIX engine using Python and Quickfix, and have managed to get the engine to recognize custom messages by modifying the data dictionary used (with necessary message groups). </p>
  
  <p>The problem I am now facing is reading repeating groups from the custom messages. The <a href="http://www.quickfixengine.org/quickfix/doc/html/python/repeating_groups_2.html" rel="nofollow">quickfix documentation</a> shows the following:</p>
  
  <pre><code>import quickfix
  import quickfix42
  
  noMDEntries = quickfix.NoMDEntries()
  message.getField(noMDEntries)
  
  group = quickfix42.MarketDataSnapshotFillRefresh.NoMDEntries()
  MDEntryType = quickfix.MDEntryType()
  MDEntryPx = quickfix.MDEntryPx()
  MDEntrySize = quickfix.MDEntrySize()
  orderID = quickfix.OrderID();
  
  message.getGroup(1, group);
  group.getField(MDEntryType);
  group.getField(MDEntryPx);
  group.getField(MDEntrySize);
  group.getField(orderID);
  </code></pre>
  
  <p>...which is fine for FIX messages. When i try and reference my custom message like so:</p>
  
  <pre><code>group = quickfix.CustomMessage.NoMDEntries()
  </code></pre>
  
  <p>...I get an attribute error.</p>
  
  <p>Any ideas on how to read repeating groups in custom messages?</p>
  
  <p>Edit 1:</p>
  
  <p>i found a hack, but am certain there is a better way of doing this...</p>
  
  <pre><code>for i in range(int(message.getField(NoMDEntries):
      group = quickfix.Group(int(message.repeatingField), int(message.delimField))
      message.getGroup(i+1, group)
      print group.getField(MDEntryPx)
      #do something with repeating fields etc
  </code></pre>
  
  <p>...ideas anyone?</p>