summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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: