NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

Changeset 385

Show
Ignore:
Timestamp:
10/22/10 13:03:30
Author:
cbc
Message:

Cleanup loop variable nonsense in query module.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spongenet/trunk/spongenet/query.py

    r384 r385  
    436436    rows = [[] for cell in varmap["time"]] 
    437437    for column in columns: 
    438         for pos in range(len(rows)): 
    439             cell = varmap[column][pos] 
     438        for row, cell in zip(rows, varmap[column]): 
    440439            if column == "time": 
    441440                cell = time.strftime("%m/%d/%Y %H:%M:%S", 
    442441                                     time.gmtime(cell)) 
    443             rows[pos].append(cell) 
     442            row.append(cell) 
    444443 
    445444    # Output the CSV file.