Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- user = raw_input("Username: ")
- pw = raw_input("Password: ")
- if user == "PrOoOg" and pw == "aka443":
- def add_acc_func(acc, user, pw):
- database.write("nAccount: ")
- database.write(acc)
- database.write(" Username: ")
- database.write(user)
- database.write(" Password: ")
- database.write(pw)
- database.close()
- def print_database_func():
- for lines in database.readlines():
- print lines.strip('n')
- database.close()
- user_input = raw_input('Press "A" to add a new accountnPress "M" to modify and existing accountn'
- 'Press "D" to delete and existing accountnPress "S" to show all accounts and passwordsn')
- user_choice = user_input.lower()
- if user_choice == "a":
- database = open("source.txt", "a") #Everything worked fine when i deleted this line
- acc_to_add = raw_input("Write the name of the site or service: ").lower()
- acc_to_add_user = raw_input("Write the username or email you want to set for that account: ")
- acc_to_add_pw = raw_input("Write the password you want to set to that account: ")
- add_acc_func(acc_to_add, acc_to_add_user, acc_to_add_pw)
- print "Account added"
- if user_choice == "s":
- database = open("source.txt", "r") #Everything worked fine when i deleted this line
- print_database_func()
- raw_input("Press Enter to quit")
- else:
- print ("Wrong username or password")
- time.sleep(3)
Add Comment
Please, Sign In to add comment