[portland] Clue Stick Needed
rshepard at appl-ecosys.com
Wed Jan 16 23:26:24 CET 2008
I am embarrassed to have to ask for help on this issue, but I'm just not
seeing how to accomplish the task.
Selected from a database table is a list of tuples; each tuple I call a
'row' of category names. Each name has from 1 to 7 subunits, and its
sequential number is in row. The total number of subunits is row.
Both row and row are integers.
What I need to do is go through the list of rows and isolate the items, in
sequential order, grouped by names. In C I would write 'for i=0, i<row,
i++', but what I thought would be the Python equivalent, 'for i < row',
is not valid. If I try a nested while loop, it hangs on the first item of
the first variable.
This is obviously a very basic and simple task but how to do it keeps
eluding me. This is how I've started the function:
for i in range(len(self.appData.tsets)):
row = self.appData.tsets[i]
# select component, subcomponent, variable names
curComp = row
curSub = row
curVar = row
tb.x += 9
if row == '':
tb.x += 36
tb.x += 9
# set up for plotting
... and it's here that I want to extract each item in sequential order, up
to the maximum number, represented in row.
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the Portland