X-Git-Url: http://git.dolda2000.com/gitweb/?p=pdm.git;a=blobdiff_plain;f=pdm-repl;h=cc5c2890465d1c39e46902b0644be9c7cd50d9f8;hp=daa8c1888da9e8c0e027fe3a02be60ed9d388819;hb=HEAD;hpb=37ee55d2b9034ff1373bff4e214d346111e01cef diff --git a/pdm-repl b/pdm-repl index daa8c18..cc5c289 100755 --- a/pdm-repl +++ b/pdm-repl @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 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 = raw_input(" ") + line = input(" ") else: - line = raw_input("% ") + line = input("% ") except EOFError: break if line == "":