midi: python3 compatibility fix (issue #82)

This commit is contained in:
jean-emmanuel 2017-08-18 13:41:34 +02:00
parent a00884a2f5
commit 17a9c67ee7

View file

@ -1,4 +1,4 @@
from sys import argv, stdin, stdout
from sys import argv, stdin, stdout, version_info
import json as JSON
@ -12,6 +12,9 @@ except:
ipcSend('error', 'pyrtmidi not found (or wrong version)')
if version_info.major == 3:
raw_input = input
def ipcSend(name, data):
print(JSON.dumps([name, data]))
stdout.flush()