-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors_bla.py
More file actions
41 lines (30 loc) · 775 Bytes
/
errors_bla.py
File metadata and controls
41 lines (30 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import lexparse_bla
import sys
l_list = lexparse_bla.l_errors_list
p_list = lexparse_bla.p_errors_list
s_list = lexparse_bla.s_errors_list
printed = []
def l_errors(file_out):
for item in l_list:
file_out.write(item)
print(item)
def p_errors(file_out):
for item in p_list:
file_out.write(item)
print(item)
def s_errors(file_out):
for item in s_list:
file_out.write(item)
print(item)
def main():
input_filename = sys.argv[1]
output_filename = input_filename[:input_filename.rfind('.')] + '.err'
file_out = open(output_filename, mode='w')
l_errors(file_out)
if len(l_list) == 0:
p_errors(file_out)
if len(p_list) == 0:
s_errors(file_out)
file_out.close()
if __name__ == "__main__":
main()