madscatt / zazzie

development branch
GNU General Public License v3.0
2 stars 3 forks source link

convert input_filter to python 3 #162

Open madscatt opened 9 months ago

madscatt commented 9 months ago

Noticed that the following python2 method crashes in python3, which breaks check_pdb_dcd()

` def check_binary(filename): textchars = "".join( map(chr, [7, 8, 9, 10, 12, 13, 27] + range(0x20, 0x100)))

def is_binary_string(bytes): return bool(bytes.translate(None, textchars))

flag = is_binary_string(open(filename).read(1024))

return flag

`

File "/home/curtisj/anaconda3/lib/python3.9/site-packages/sassie/interface/input_filter.py", line 286, in check_binary map(chr, [7, 8, 9, 10, 12, 13, 27] + range(0x20, 0x100))) TypeError: can only concatenate list (not "range") to list