| 1 |
ninoborges |
8 |
# This program will populate an ipf with if statements based on a file full of
|
| 2 |
|
|
# user names.
|
| 3 |
|
|
#EABORGES
|
| 4 |
|
|
#10.23.01
|
| 5 |
|
|
|
| 6 |
|
|
import sys
|
| 7 |
|
|
|
| 8 |
|
|
f=open('c:\\PeopleView_Shrtct_inst_new.ipf','r')
|
| 9 |
|
|
contents = f.readlines()
|
| 10 |
|
|
f.close()
|
| 11 |
|
|
contents = contents[77:88]
|
| 12 |
|
|
#names=open('c:\\Accounting_grp.txt','r')
|
| 13 |
|
|
names=open('c:\\PeopleView_Users_new.txt','r')
|
| 14 |
|
|
usernmlist = names.readlines()
|
| 15 |
|
|
names.close()
|
| 16 |
|
|
|
| 17 |
|
|
|
| 18 |
|
|
for x in usernmlist:
|
| 19 |
|
|
#print x
|
| 20 |
|
|
output = open('c:\\newipf.txt','a')
|
| 21 |
|
|
newcontents = contents[0]+contents[1]+contents[2][1:8]+x+contents[3]+contents[4]+contents[5]+contents[6]+contents[7]+contents[8]+contents[9]+contents[10]
|
| 22 |
|
|
#for y in newcontents:
|
| 23 |
|
|
output.writelines(newcontents)
|
| 24 |
|
|
#for y in newcontents:
|
| 25 |
|
|
#print y
|
| 26 |
|
|
output.close()
|
| 27 |
|
|
print newcontents
|