Last change
on this file since 2891 was
2634,
checked in by nicholas, 19 years ago
|
Corrected folder lookups for CCS.py
|
File size:
660 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | import os |
---|
4 | import string |
---|
5 | import operator |
---|
6 | |
---|
7 | B_list_unsorted=os.listdir("buildings_Str_half_Off") |
---|
8 | B_strings=[] |
---|
9 | B_list=[] |
---|
10 | for B_L in B_list_unsorted: |
---|
11 | A = B_L.split('=')[0] + '=' # first part of string |
---|
12 | B = float(B_L.split('=')[1].split('_')[0]) # middle part of string |
---|
13 | C = '_' + B_L.split('=')[1].split('_')[1] # last part of string |
---|
14 | B_current = [A,B,C]; B_strings.append(B_current) |
---|
15 | |
---|
16 | B_strings.sort(key=operator.itemgetter(1)) |
---|
17 | #B_strings.sort(lambda x, y: cmp(x[1],y[1])) |
---|
18 | |
---|
19 | for stt in B_strings: |
---|
20 | stt[1]=str(stt[1]) |
---|
21 | final=string.join(stt).replace(' ','') |
---|
22 | B_list.append(final) |
---|
23 | print B_list |
---|
24 | print "you suck222222222" |
---|
Note: See
TracBrowser
for help on using the repository browser.