After decades of Fortran and C, I'm quite new to Python and all the great tools it provides. So, I'd like mentoring in how to most elegantly and effectively parse data read over a serial port from a scanner, and how to build a 2D array from it. After this, I'll probably need help in other NumPy array (matrix) manipulations. But, first things first: Data are entered on an optical mark readable (OMR) form, which is scanned and the data sent over a serial line. Each form read transmits 69 bytes; there are 2 bytes for each "column" (where there is a timing mark on the edge of the form) and their position within that column determines their value. The form has two blank lines (with timing marks) and three lines with labels; these transmit the equivalent of '0' and are not recorded. The final byte is a carriage return, '\r,' which is translated into a newline ('\n') by the method. For each form read I want to record the form number (programmatically sequentially assigned, starting with '1') and the data from the form as a row. The total forms read then fill a two-dimensional array. The two issues with which I would like help are: How to slice the list of data from the scanner stream into two-byte chunks (leaving the end-of-record byte to be dealt with separately), How to build the array so that each form read creates a new row in the array. While the 31 columns are fixed, the number of rows is indeterminate until all submitted forms have been read. I've attached the 95-line 'OnScan.py' to this message; it's a single function within the application. TIA, Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863