ReadcolThis code is now hosted at the agpy google code siteReading columns of ASCII text is one of the most basic functions a programmer can need. For example, reading the output of a FORTRAN code. IDL has the flexible and powerful readcol.pro from Goddard Space Flight Center's astrolib. Python has no equivalent, as far as I can tell. This code is meant to be the pythong equivalent of readcol. I don't claim that it's perfectly flexible at the moment, but it's fast, and I'm willing to work to improve it. Originally I had used readline() but this is terribly slow for large files; now readlines() is used. See below. |
readfile("python/readcol.py"); ?>
|