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

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. >>> import pEp
  5. >>> def message_to_send(msg):
  6. ... m, keys, rating, flags = msg.decrypt()
  7. ... try:
  8. ... m.attachments[0].decode()
  9. ... print("decode successfull")
  10. ... except UnicodeDecodeError as e:
  11. ... print("decode failed")
  12. >>> pEp.message_to_send = message_to_send
  13. >>> pEp.myself(pEp.Identity(""))
  14. >>> pEp.key_reset_all_own_keys()
  15. decode successfull
  16. decode successfull
  17. decode successfull
  18. """
  19. if __name__ == "__main__":
  20. import doctest
  21. doctest.testmod()