diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-14 11:28:08 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-14 11:28:08 +0100 |
| commit | bcc833522cc25b7217e81644b804675ab19c1a63 (patch) | |
| tree | 4619a5fe5a3b0d41d600715e67388b2a56080430 /tools | |
| parent | 81c84c9cd22e0b6c56b90fa470dad55b9bb716e0 (diff) | |
cleaning up directories and build system
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/binarize.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/tools/binarize.py b/tools/binarize.py deleted file mode 100644 index 6dcbdef..0000000 --- a/tools/binarize.py +++ /dev/null @@ -1,40 +0,0 @@ -# this is a simple script to convert the ascii files into binaries -# everything but 0 an 1 , or alternatively _ and X is ignored in -# source file. - -import binascii -import sys - - -f=open(sys.argv[1],'r') -o=open(sys.argv[2],'wb') - -print "binarizing " + sys.argv[1] + " to "+sys.argv[2] + "." - -b="" -l=0 - -while True: - - c=f.read(1) - - if not c: - break - - if c=="0" or c=='_': - l+=1 - b+="0" - - if c=="1" or c=='X': - l+=1 - b+="1" - - if l==8: -# print b - l=0 - o.write(chr(int(b,2))) - b="" - -o.close() - - |
