On Friday 08 July 2005 01:31 pm, gov wrote: > Where I work, we receive large quantities of data which is currently > all printed on large, obsolete, dot matrix printers. This is a problem > because the replacement parts will not be available for much longer. > > So I'm trying to create a program which will capture the fixed width > text file data and convert as well as sort the data (there are several > different report types) into a different format which would allow it to > be printed normally, or viewed on a computer.
If this is really your reason for wanting to do this, it seems like your solutions is overkill. If you really just want the data to get reformatted for printing on a modern printer, it would be trivial to do this with a text-formatter like "enscript" (see, e.g.: http://people.ssh.com/mtr/genscript/ ) which produces Postscript output from ASCII text. On a typical Linux system, this sort of tool is usually part of your printer installation, after which it runs more or less invisibly. OTOH, if the *real* reason is that you don't like the look of the dot matrix output and you want it *rearranged* and reformatted for aesthetic reasons, then you might reasonably want to use Python to do that as you suggest. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list