Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python
import kwalletbinding as kw
def operation():
  op = raw_input("Add or Read? ")
  return op
def addpass():
  kw.kwallet_put('kdewalletcli',raw_input("Name: "),raw_input("Password: "))
  print("...\nDone!")
def getpass():
  readpass = kw.kwallet_get('kdewalletcli',raw_input("Name: "))
  print "...\nThe password is: " + readpass

# Main
if kw.kwallet_available() == True:
  op = operation()
  if op.lower() == "add":
    addpass()
  else:
    getpass()
else:
  print "Y U NO HAVE KWALLET? "