How would one read line (x) from a file?
Published: Wednesday, Dec 26, 2007 Last modified: Thursday, Nov 14, 2024
Another IRC adventure:
00:33 < hendry> exarkun: readlines()[lineno] perhaps?
00:33 < ivan> for small files
00:33 < ivan> you can use a lot less memory with xreadlines and a counter
00:33 < deltab> linecache
00:34 < ivan> hurray
00:34 < hendry> deltab: linecache?
00:34 < ivan> http://www.python.org/doc/current/lib/module-linecache.html