# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2005 The Trustees of Princeton University
#
-# $Id: Shell.py,v 1.1 2007/01/08 18:10:30 mlhuang Exp $
+# $Id: plcsh,v 1.3 2007/01/11 20:45:29 mlhuang Exp $
#
import os
import sys
from optparse import OptionParser
+from getpass import getpass
from traceback import print_exc
sys.path.append(os.path.dirname(os.path.realpath(sys.argv[0])))
# If user is specified but password is not
if options.user is not None and options.password is None:
try:
- options.password = getpass.getpass()
+ options.password = getpass()
except (EOFError, KeyboardInterrupt):
print
sys.exit(0)
url = options.url, xmlrpc = options.xmlrpc, cacert = options.cacert,
method = options.method, role = options.role,
user = options.user, password = options.password)
+ # Register a few more globals for backward compatibility
+ auth = shell.auth
+ api = shell.api
+ config = shell.config
except Exception, err:
print "Error:", err
print