i am writing some code, and i have a problem. i have the functions i wrote working fine, but the main loop (which should work indefinetely) only correctly works once. here is the code:
while 1==1:
choice=int(raw_input("press 1 for encrypt, 2 for decrypt"))
if choice==1:
string=raw_input("please enter plaintext here\n")
print('cipher-text follows and was copied to clipboard "'+encrypt_string(string))+'"'
elif choice==2:
string=raw_input("please enter cipher-text here\n")
print('plaintext follows : "'+decrypt_string(string))+'"'
else:
print("please enter a valid option")
the problem follows that the whole loop works once, but then it proceeds to skip the raw_Input command and throw up a value error. i cant see why it would do this. any ideas?
edit, the error:
Traceback (most recent call last):
File "C:\Users\Raffi\Documents\python\encryptor.py", line 37, in <module>
choice=int(raw_input("press 1 for encrypt, 2 for decrypt"))
ValueError: invalid literal for int() with base 10: ''