diff options
author | David Robillard <d@drobilla.net> | 2013-06-09 00:49:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-06-09 00:49:04 +0000 |
commit | 2cfe8f720c1691998a22fc5923e3ec93fc6859ef (patch) | |
tree | 8ce4a8d93b285cdde1621e9d1d173df3329cd4e6 | |
parent | 8c3d9de4c4a432dd910c5bafba4dd0afb74550a4 (diff) | |
download | ingen-2cfe8f720c1691998a22fc5923e3ec93fc6859ef.tar.gz ingen-2cfe8f720c1691998a22fc5923e3ec93fc6859ef.tar.bz2 ingen-2cfe8f720c1691998a22fc5923e3ec93fc6859ef.zip |
Python 3 fixes (#913).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5134 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | scripts/ingen.py | 6 | ||||
-rwxr-xr-x | scripts/ingenams | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/scripts/ingen.py b/scripts/ingen.py index c66b0293..685b0538 100644 --- a/scripts/ingen.py +++ b/scripts/ingen.py @@ -14,12 +14,16 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -import StringIO import os import rdflib import socket import sys +try: + import StringIO +except ImportError: + from io import StringIO + class NS: ingen = rdflib.Namespace('http://drobilla.net/ns/ingen#') ingerr = rdflib.Namespace('http://drobilla.net/ns/ingen/errors#') diff --git a/scripts/ingenams b/scripts/ingenams index bad29406..a736efa1 100755 --- a/scripts/ingenams +++ b/scripts/ingenams @@ -86,7 +86,7 @@ class World: for (head_port_id, tail_port_id, head_mod_id, tail_mod_id, jack_color, cable_color) in self.pending_arcs: - print 'ARC %s:%s => %s:%s' % (tail_mod_id, tail_port_id, head_mod_id, head_port_id) + print('ARC %s:%s => %s:%s' % (tail_mod_id, tail_port_id, head_mod_id, head_port_id)) try: tail_mod = rdflib.URIRef(self.server.server_base + self.mod_sym(tail_mod_id)) head_mod = rdflib.URIRef(self.server.server_base + self.mod_sym(head_mod_id)) @@ -181,10 +181,10 @@ def ladspa_module(world, mod_id, x, y, poly, lib, label): if lv2_uri: world.add_block(mod_id, lv2_uri, x, y) else: - print 'MOD %3d LADSPA %s %s %s' % (mod_id, poly, lib, label) + print('MOD %3d LADSPA %s %s %s' % (mod_id, poly, lib, label)) def scala_module(world, mod_id, scala_name): - #print 'MOD %3d SCALA %s' % (d, scala_name) + #print('MOD %3d SCALA %s' % (d, scala_name)) pass def standard_module(world, mod_id, x, y, name, arg): @@ -193,11 +193,11 @@ def standard_module(world, mod_id, x, y, name, arg): def float_control(world, mod_id, port_index, value, logarithmic, minimum, maximum, midi_sign): - #print 'FLOAT CONTROL %s:%s = %s' % (mod_id, port_index, value) + #print('FLOAT CONTROL %s:%s = %s' % (mod_id, port_index, value)) pass def control(world, mod_id, port_index, value, midi_sign): - #print 'CONTROL %s:%s = %s' % (mod_id, port_index, value) + #print('CONTROL %s:%s = %s' % (mod_id, port_index, value)) pass if len(sys.argv) != 2 and len(sys.argv) != 3: @@ -255,6 +255,6 @@ for l in in_file: world.create_arcs() -#print world.server.model.serialize(format='n3') +#print(world.server.model.serialize(format='n3')) in_file.close() |