Commit dd463121 authored by Dylan Wang's avatar Dylan Wang

make remove_code python3 compatible

parent 8613e248
#!/usr/bin/env python
# This is simple script is used to remove a function from code
import commands
import sys
import os.path
input_file = open(sys.argv[1], "r")
output_file = open(sys.argv[2], "w")
......@@ -13,12 +10,12 @@ cont=False
for l in input_file:
if "#END REMOVE ME FROM PACKAGE" in l:
cont = False
cont = False
elif "#BEGIN REMOVE ME FROM PACKAGE" in l:
cont = True
cont = True
elif cont:
continue
continue
else:
output_file.write(l)
output_file.write(l)
print "Finished cleaning file"
print("Finished cleaning file")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment