如何編寫正確的語句在Python逃逸的錯誤...想我如何逃避Trackback或任何類型的錯誤錯誤?
例
import base64
encode = base64.b64encode(raw_input('Enter Data: '))
data = base64.b64decode(encode)
print 'Your Encoded Message is: ' + encode
print '.'
print '.'
print '.'
print '.'
print '.'
decode = base64.b64decode(raw_input('Enter Encoded Data: '))
data2 = base64.b64decode(encode)
print 'Your Encoded Message is: ' + decode
現在這個腳本不僅會是編碼和解碼的原始數據。當我輸入正常的原始數據時出現錯誤'Enter Encoded Data: '
我想如何逃脫錯誤類似對不起!您輸入的數據將被編碼。
而不是引用垃圾。
爲什麼你加倍解碼它? – thefourtheye
['試試:b64decode(...)除了Exception:e:...'](http://docs.python.org/2/tutorial/errors.html#handling-exceptions) –