p≡p for Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
530 B

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
>>> import pEp
>>> def message_to_send(msg):
... m, keys, rating, flags = msg.decrypt()
... try:
... m.attachments[0].decode()
... print("decode successfull")
... except UnicodeDecodeError as e:
... print("decode failed")
>>> pEp.message_to_send = message_to_send
>>> pEp.myself(pEp.Identity(""))
>>> pEp.key_reset_all_own_keys()
decode successfull
decode successfull
decode successfull
"""
if __name__ == "__main__":
import doctest
doctest.testmod()