Functions | |
def | line |
def | strip |
def | simple_diff |
def | real_diff |
Variables | |
list | one = sys.argv[1] |
list | two = sys.argv[2] |
def diff_out::line | ( | f | ) |
Definition at line 12 of file diff_out.py.
00012 : 00013 in_dump = False 00014 for l in f: 00015 if in_dump: yield l 00016 if "%%% BEGIN DUMP %%%" in l: 00017 in_dump = True 00018 continue; 00019 if "%%% END DUMP %%%" in l: 00020 in_dump = False 00021 continue 00022 continue 00023 yield None 00024 pass 00025 def strip(f1,f2):
def diff_out::strip | ( | f1, | ||
f2 | ||||
) |
Definition at line 26 of file diff_out.py.
00026 : 00027 in_dump = False 00028 for l in f1: 00029 if in_dump: f2.write(l) 00030 if "%%% BEGIN DUMP %%%" in l: 00031 in_dump = True 00032 continue; 00033 if "%%% END DUMP %%%" in l: 00034 in_dump = False 00035 continue 00036 continue 00037 pass 00038 def simple_diff():
def diff_out::simple_diff | ( | ) |
Definition at line 39 of file diff_out.py.
00039 : 00040 file1 = open(one,"r") 00041 file2 = open(two,"r") 00042 for l1,l2 in zip(line(file1),line(file2)): 00043 if l1 == l2: continue; 00044 print one,": ",l1, 00045 print two,": ",l2 00046 def real_diff():
def diff_out::real_diff | ( | ) |
Definition at line 47 of file diff_out.py.
00047 : 00048 for fname in [one,two]: 00049 i = open(fname,"r") 00050 o = open(fname+".stripped","w") 00051 strip(i,o) 00052 print one+".stripped",two+".stripped" 00053 00054 real_diff() 00055 00056 00057 00058 00059 00060 00061 00062 00063
list diff_out::one = sys.argv[1] [static] |
Definition at line 6 of file diff_out.py.
list diff_out::two = sys.argv[2] [static] |
Definition at line 7 of file diff_out.py.