Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys, time
- print "Welcome to your personal notemaker."
- operation = input("Choose operation:\n1) Make a new file\n2) Write to an existing file\nAwaiting command: ")
- while True:
- username = raw_input("Enter username: ")
- if username == 'Mikesch':
- password = raw_input("Enter password: ")
- if password == 'wazakindjes':
- print "Logged in."
- break
- else:
- print "Wrong password/username. Access denied."
- sys.exit(1)
- if operation == 1:
- filename = raw_input("Enter a filename(with extension): ")
- creating = open(filename, "w")
- note = raw_input("Enter your note(type \\n for a new line): ")
- creating.write(note)
- creating.close()
- print "Note token successfully. Exiting program..."
- time.sleep(2)
- sys.exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement