summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-11-08 01:08:13 +0000
committerDavid Robillard <d@drobilla.net>2015-11-08 01:08:13 +0000
commit9c2bb9e0e2bfd726eef5d7680bc674915817832f (patch)
tree5f315a38398f04719aaa3b8fa893a01cd0c96923
parent8510f80faad7a719a97cf14b1a82a1cc2141282b (diff)
downloadingen-9c2bb9e0e2bfd726eef5d7680bc674915817832f.tar.gz
ingen-9c2bb9e0e2bfd726eef5d7680bc674915817832f.tar.bz2
ingen-9c2bb9e0e2bfd726eef5d7680bc674915817832f.zip
Fix ingenish for Python 3
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5811 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--scripts/ingen.py3
-rwxr-xr-xscripts/ingenish10
2 files changed, 9 insertions, 4 deletions
diff --git a/scripts/ingen.py b/scripts/ingen.py
index 4af037ba..8a9c8a2e 100644
--- a/scripts/ingen.py
+++ b/scripts/ingen.py
@@ -185,8 +185,7 @@ class Remote(Interface):
# Receive response and parse into a model
response_str = self.recv()
- response_model = rdflib.Graph()
- response_model.namespace_manager = self.ns_manager
+ response_model = rdflib.Graph(namespace_manager=self.ns_manager)
response_model.parse(StringIO(response_str), self.server_base, format='n3')
# Handle response (though there should be only one)
diff --git a/scripts/ingenish b/scripts/ingenish
index a1ff3a56..2e5d3d88 100755
--- a/scripts/ingenish
+++ b/scripts/ingenish
@@ -25,6 +25,12 @@ try:
except:
pass
+# Python 2 compatibility
+try:
+ input = raw_input
+except NameError:
+ pass
+
def print_usage():
print('''Usage: ingenish [OPTION]... [COMMAND [ARGUMENT]...]
@@ -39,7 +45,7 @@ Options:
Commands:
put SUBJECT BODY
- set SUBJECT BODY
+ set SUBJECT KEY VALUE
connect TAIL HEAD
disconnect TAIL HEAD
patch SUBJECT REMOVE ADD
@@ -101,7 +107,7 @@ if len(sys.argv) - a == 0:
print('Ingen server at %s' % server)
while True:
try:
- run(shlex.split(raw_input('> ')))
+ run(shlex.split(input('> ')))
except (EOFError, KeyboardInterrupt, SystemExit):
break
except: