2016-02-19 22:10:24 +01:00
|
|
|
|
|
|
|
|
2016-02-21 21:25:37 +01:00
|
|
|
program_version = '0.0.1 (alpha)'
|
|
|
|
|
|
|
|
|
2016-02-19 22:10:24 +01:00
|
|
|
def log(data):
|
2016-02-21 21:25:37 +01:00
|
|
|
with open('logs.log', 'a') as fl:
|
2016-02-19 22:10:24 +01:00
|
|
|
fl.write(str(data))
|
|
|
|
|
2016-02-20 09:06:24 +01:00
|
|
|
|
|
|
|
def string_to_bin(tox_id):
|
2016-02-21 21:25:37 +01:00
|
|
|
return tox_id.decode('hex')
|
2016-02-20 09:06:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
def bin_to_string(raw_id):
|
|
|
|
res = ''.join('{:02x}'.format(ord(x)) for x in raw_id)
|
|
|
|
return res.upper()
|