On 2016-02-18 07:33, wrong.addres...@gmail.com wrote: > Another question I have is regarding reading numerical data from > text files. Is it necessary to read one character at a time, or can > one read like in Fortran and Basic (something like Input #5, X1, > X2, X3)?
A lot of my work is extracting data from text files. If it's CSV-format data, Python's "csv" module in the standard library offers some nice tools for doing this. If the numbers are in plain-text, but at fixed column-offsets, I usually create a mapping of slices to make it easier to work with. If this is the case and you want some example code, I can dig some up. Finally, if the data is actually binary, Python's "struct" module (also in the standard library) makes it a lot easier to work with such data. -tkc -- https://mail.python.org/mailman/listinfo/python-list