# Read disk file output from SortedMemList

# Reformat and write back to disk

 

fStr = open(r'C:\SDS2_7.0\output\tem.txt').read()

fList = [i for i in fStr.split('\n') if i != '']

outStr = fList[0]

mkList = ['%s_%04d' % (i[0], int(i[1])) for i in [j.split('_') for j in fList[1:]]]

mkList.sort()

outStr += '\n' + '\n'.join(mkList)

f = open(r'C:\SDS2_7.0\output\tem1.txt', 'w')

f.write(outStr)

f.close()

 

# print outStr

 

'''

Braced Frame Members Lines G & H, VB Penthouses

B_0007

B_0009

B_0010

B_0011

B_0013

B_0014

B_0015

B_0017

B_0018

B_0030

B_0031

B_0075

B_0084

B_0128

B_0129

B_0231

B_0232

B_0297

B_0298

B_0412

B_0413

B_0516

B_0523

B_0610

B_0611

B_0662

B_0663

B_0709

B_0710

B_0750

B_0753

B_0761

B_0801

B_0802

VB_0008

VB_0019

VB_0032

VB_0033

VB_0048

VB_0049

VB_0085

VB_0286

VB_0288

VB_0525

VB_0656

VB_0803

VB_0804

VB_0805

VB_0806

VB_0808

VB_1002

'''