[portland] Need Help With a For Loop
kirby urner
kirby.urner at gmail.com
Fri Mar 21 20:40:56 CET 2008
Hi Rich,
I didn't go as far as plot sequence number, but that could be added
with one more line of code inserted after the existing lines:
ranked = sorted(ranked, key=little lambda with the right key number).
The plots would then just naturally be in that sequence, no other
code needed (although when plots get superimposed, I'm not
sure what "sequence" even means -- but that's your department,
no need to explain).
Kirby
On Fri, Mar 21, 2008 at 3:32 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Fri, 21 Mar 2008, kirby urner wrote:
>
>
> > OK, so here's my solution, using only basic Python:
>
> Thank you, Kirby. I'll work on this and see if I can translate it to the
> actual, more extensive function.
>
> The list, varData, is sorted after being selected from the database
> tables. Sort order is component, subcomponent, parent, plot sequence number.
> Perhaps I headed off in the wrong direction because I was trying to use the
> already sorted tuples rather than sorting them as needed.
>
> Probably be tomorrow before I've thoroughly explored this.
>
>
> Rich
>
> --
> 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
>
>
> _______________________________________________
> Portland mailing list
> Portland at python.org
> http://mail.python.org/mailman/listinfo/portland
>
More information about the Portland
mailing list