Anyone know of a MICR parser algorithm written in Python?

mkppk barnaclejive at gmail.com
Sat Mar 24 19:52:49 EDT 2007


On Mar 24, 4:55 pm, "Paul McGuire" <p... at austin.rr.com> wrote:
> On Mar 24, 2:05 pm, "mkppk" <barnaclej... at gmail.com> wrote:
>
>
>
> > MICR = The line of digits printed using magnetic ink at the bottom of
> > a check.
>
> > Does anyone know of a Python function that has been written to parse a
> > line of MICR data?
> > Or, some financial package that may contain such a thing?
> > Or, in general, where I should be looking when looking for a piece of
> > Python code that may have already been written by someone?
>
> > I'm working on a project that involves a check scanner the produces
> > the raw MICR line as text.
>
> > Now, that raw MICR needs to be parsed for the various pieces of info.
> > The problem with MICR is that there is no standard layout. There are
> > some general rules for item placement, but beyond that it is up to the
> > individual banks to define how they choose to position the
> > information.
>
> > I did find an old C program written by someone at IBM... But I've read
> > it and it is Not code that would nicely convert to Python (maybe its
> > all the Python I'm used to, be it seems very poorly written).
>
> > Here is the link to that C code:ftp://ftp.software.ibm.com/software/retail/poseng/4610/4610micr.zip
>
> > I've even tried using boost to generate a Python module, but that
> > didn't go well, and in the end is not going to be a solution for me
> > anyway.. really need access to the Python source.
>
> > Any help at all would be appreciated,
>
> > -mkp
>
> Is there a spec somewhere for this data?  Googling for "MICR data
> format specification" and similar gives links to specifications for
> the MICR character *fonts*, but not for the data content.
>
> And you are right, reverse-engineering this code is more than a 10-
> minute exercise.  (However, the zip file *does* include a nice set of
> test cases, which might be better than the C code as a starting point
> for new code.)
>
> -- Paul


Well, the problem is that the "specification" is that "there is no
specification", thats just the way the MICR data line has evolved in
the banking industry unfortunately for us developers.. That being
said, there are obviusly enough banking companies out that with enough
example data to have intelligent parsers that handle all the
variations. And the C program appears to have all that built into it.

Its just that I would rather not reinvent the wheel (or read old C
code)..

So, the search continues..




More information about the Python-list mailing list