Cannot find what I'm sure is a simple command... please help.

Aahz aahz at pythoncraft.com
Sun Mar 31 20:38:01 EST 2002


In article <3ca7b638.259145474 at mammoth.usenet-access.com>,
A. Jones <netzapper at magicstar.net> wrote:
>On Sun, 31 Mar 2002 19:39:45 -0500, "John Roth"
><johnroth at ameritech.net> wrote:
>>
>>If you read the file into a list using readlines(), you can then
>>access each line by the index into the list. Unfortunately, that
>>doesn't get you one line without reading the entire file up to
>>that point...
>
>Right, I knew I could do that.  However, when I did that, it causes a
>meltdown when I index from that list, owing to the large size of the
>file (it's a database, with each entry on a separate line, but with an
>arbitrary line size).

Get a real database.  Then you can retrieve an arbitrary record.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list