summaryrefslogtreecommitdiff
path: root/sandbox/docbook/examples/method_of_least_squares/make_default.py
blob: 6b6492ec0da099ff8bbd13d201e30658f1f5e2fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# a simple script to fix bad fomatting forced by the formatting contraintes of
# the original
#
read_obj = open('method_of_least_squares.rst', 'r')
write_obj = open('method_of_least_squares_clean.rst', 'w')
line_to_read = 1
while line_to_read:
    line_to_read = read_obj.readline()
    line = line_to_read
    line = line.replace(' Miller [*]_', ' Miller') 
    line = line.replace('see equation (', 'see (')# makes the document consistent
    if '.. [*] E-mail:' in line:
        continue
    write_obj.write(line)
    if 'Providence,' in line:
        write_obj.write('          sjmiller@math.brown.edu\n') 
        # write_obj.write(':contact: sjmiller@math.brown.edu\n') 

read_obj.close()
write_obj.close()