X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=pdm-repl;h=992df4ff87d121c22c59e60b6aa1a3cc419d4ffe;hb=refs%2Fheads%2Fpython2;hp=c8fe2773768896b132a80d1e69d287ca21be259e;hpb=c58b1ad8cc6658ea46ed049f6909b4ce05906b57;p=pdm.git diff --git a/pdm-repl b/pdm-repl index c8fe277..992df4f 100755 --- a/pdm-repl +++ b/pdm-repl @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python import sys, getopt, readline import pdm.cli @@ -14,15 +14,19 @@ for o, a in opts: if len(args) < 1: usage(sys.stderr) sys.exit(1) -cl = pdm.cli.replclient(args[0]) +try: + cl = pdm.cli.replclient(args[0]) +except Exception as e: + sys.stderr.write("%s: %s\n" % (args[0], e)) + sys.exit(1) buf = "" while True: try: if buf != "": - line = input(" ") + line = raw_input(" ") else: - line = input("% ") + line = raw_input("% ") except EOFError: break if line == "":