Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fileOpenEncrypt(): #Defines "fileOpenEncrypt" to ask the user for the file, then opens it for encryption
- fileName = raw_input("Enter the name of the file, with extension, to be encrypted: ")
- try:
- with open(fileName, 'r') as myFile:
- fileContents=myFile.read().replace('\n', ' ')
- except:
- print ("\nFile not found, try again")
- textMenu()
- selectOption()
- else:
- print " "
- print "Here are the contents of the file: ",fileContents
- with open(fileName, "r") as ins:
- fileContentsArray = []
- for line in ins:
- fileContentsArray.append(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement