Tag Archive

amateur astronomy awk bash be b[e] supergiant cartoon conference convert evolved star exoplanet fedora figaro fits fun galaxy history iraf jupiter latex linux lmc machine learning massive star matplotlib meteor mypaper paper peblo photometry planet pro-am pyraf python scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk theli ubuntu university of crete video x-ray

Python’s readlines options

A very interesting post on the different ways readline can be used in Python:

> .readlines() : reads the whole file at once and creates a list of lines

> .readline() : reads one character at the time

> .xreadlines() : reads one line at a time (for large files).