summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/ingen.py10
-rwxr-xr-xscripts/ingenams3
2 files changed, 7 insertions, 6 deletions
diff --git a/scripts/ingen.py b/scripts/ingen.py
index e0a71a47..8eb67d9d 100644
--- a/scripts/ingen.py
+++ b/scripts/ingen.py
@@ -20,9 +20,9 @@ import socket
import sys
try:
- import StringIO
+ import StringIO.StringIO as StringIO
except ImportError:
- from io import StringIO
+ from io import StringIO as StringIO
class NS:
ingen = rdflib.Namespace('http://drobilla.net/ns/ingen#')
@@ -134,9 +134,9 @@ class Remote(Interface):
def recv(self):
'Read from socket until a NULL terminator is received'
- msg = ''
+ msg = u''
while True:
- c = self.sock.recv(1, 0)
+ c = self.sock.recv(1, 0).decode('utf-8')
if not c or ord(c[0]) == 0: # End of transmission
break
else:
@@ -178,7 +178,7 @@ class Remote(Interface):
response_str = self.recv()
response_model = rdflib.Graph()
response_model.namespace_manager = self.ns_manager
- response_model.parse(StringIO.StringIO(response_str), self.server_base, format='n3')
+ response_model.parse(StringIO(response_str), self.server_base, format='n3')
# Handle response (though there should be only one)
blanks = []
diff --git a/scripts/ingenams b/scripts/ingenams
index 090db76b..27990a2c 100755
--- a/scripts/ingenams
+++ b/scripts/ingenams
@@ -16,6 +16,7 @@
import ingen
import rdflib
+import rdflib.namespace
import sys
ams_prefix = 'http://github.com/blablack/ams-lv2/'
@@ -201,7 +202,7 @@ def scala_module(world, mod_id, scala_name):
def standard_module(world, mod_id, x, y, name, arg):
if name == 'vca':
- if arg > 0:
+ if int(arg) > 0:
name += 'exp'
else:
name += 'lin'