tabular data

poupaerte at poupaerte at
Sat Apr 8 22:26:20 CEST 2000


I would like to start effectively using Python, instead of just looking
at it once in a while. From what I have read in the manuals and so, I
still can't make up how to handle tabular data properly with Python.
Tabular data and their permutations are the mainstay of the
applications I'm usually involved in.

For example, say that I have the following tabular data: [(2,1,"REC02"),
(1,3,"REC03"),(3,1,"REC01")], and I want to obtain: [(1,3,"REC03"),
(2,1,"REC02"),(3,1,"REC01")], that is, the tabular data should be
sorted on the first and then the second column.

How can I have Python perform an in-place sort on a combination of
several columns?
By the way, should I represent rows by tuples or by embedded lists?

Another problem: to visually represent/edit tabular data, I need an
editable grid widget (with possibly comboboxes as cell editors).
TkInter does not seem to have an appropriate grid widget.

Sent via
Before you buy.

More information about the Python-list mailing list