[Tutor] looking for data in large text file

Mathias Mamsch Zabelkind@web.de
Wed Jul 16 03:34:20 2003


You could just store some Inventory of the file somewhere and then read only
the bit of the file, you need to read. See the documentation of file.seek()
and file.tell() ...

Greetings, Mathias

----- Original Message -----
From: "Quentin" <qsc@icon.co.za>
To: <tutor@python.org>
Sent: Tuesday, July 15, 2003 6:41 PM
Subject: [Tutor] looking for data in large text file


> Hi All
> Newbie here.
> I want to lookup a list in a large text file (hunderd or so lines). The
> list I then use in a combobox.
> Got the wxComboBox figured out, and how to load it with a list.
>
> I want to keep the lists for various comboboxes in one text file. This
> makes it easier to edit via other means besides Python. (Something like
> a Windows .INI file with all your settings in it).
> But how do I look for a list in a text file without have to readline the
> whole file?
>
> I keep on refering to lists, with that I mean the list that loads into
> the combobox, not necessary the way it is stored in a text file.
>
> Please, no code, just some suggestions. I need to figure out the code
> for myself.
>
> Thanks
> Quentin
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor