Forgot to close

This commit is contained in:
Pedro de Oliveira 2014-08-16 04:16:59 +01:00
parent db3541fde4
commit 4614ab4c58
1 changed files with 3 additions and 2 deletions

View File

@ -9,13 +9,14 @@ if len(sys.argv) < 2:
allowed_chars = (">", "<", "+", "-", ".", ",", "[", "]") allowed_chars = (">", "<", "+", "-", ".", ",", "[", "]")
file = open(sys.argv[1], 'r') f = open(sys.argv[1], 'r')
print "ORG $9400" print "ORG $9400"
sys.stdout.write("src db \"") sys.stdout.write("src db \"")
for char in file.read(): for char in f.read():
if char in allowed_chars: if char in allowed_chars:
sys.stdout.write(char) sys.stdout.write(char)
else: else:
continue continue
print "\", 0" print "\", 0"
f.close()