midi: python3 compatibility fix (issue #82)
This commit is contained in:
parent
a00884a2f5
commit
17a9c67ee7
1 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue