import sys | |
import os | |
codegen_single_Modem_ptr_file = sys.argv[1] | |
if sys.version_info[0] >= 3: | |
f = open(codegen_single_Modem_ptr_file, "r", errors="ignore") | |
else: | |
f = open(codegen_single_Modem_ptr_file, "r") | |
file_list = f.readlines() | |
f.close() | |
new_codegen_single_Modem_ptr_content = "" | |
for i, line in enumerate(file_list): | |
if "utmd_precodegen.h" not in line: | |
new_codegen_single_Modem_ptr_content += line | |
f = open(codegen_single_Modem_ptr_file, "w") | |
f.write(new_codegen_single_Modem_ptr_content) | |
f.close() |