mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-28 13:31:01 +00:00
20a2715203
evaluate script and script to cut off CPM text files at ctrl-z (EOF)
16 lines
310 B
Python
Executable File
16 lines
310 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import sys
|
|
|
|
inFileName, outFileName = sys.argv[1], sys.argv[2]
|
|
inFile = open(inFileName, "rb")
|
|
source = inFile.read()
|
|
destination = bytearray()
|
|
for b in source:
|
|
if b == 26:
|
|
break
|
|
destination.append(b)
|
|
# result.append('')
|
|
outFile = open(outFileName, "wb")
|
|
outFile.write(destination)
|