aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Spelling fixes for comments and docAndre Heinecke2017-12-081-1/+1
| | | | | | | -- Patch provided by ka7 in dev.gnupg.org Differential D423
* python: Use vanity modules for constants in tests and examples.Justus Winter2016-10-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/gpg/constants/sig/notation.py: New file. * lang/python/gpg/constants/sig/__init__.py: Import new module. * lang/python/examples/assuan.py: Use more specific module for constants, e.g. 'protocol.ASSUAN' instead of 'PROTOCOL_ASSUAN'. * lang/python/examples/testCMSgetkey.py: Likewise. * lang/python/tests/initial.py: Likewise. * lang/python/tests/t-callbacks.py: Likewise. * lang/python/tests/t-decrypt-verify.py: Likewise. * lang/python/tests/t-decrypt.py: Likewise. * lang/python/tests/t-edit.py: Likewise. * lang/python/tests/t-encrypt-large.py: Likewise. * lang/python/tests/t-encrypt-sign.py: Likewise. * lang/python/tests/t-encrypt-sym.py: Likewise. * lang/python/tests/t-encrypt.py: Likewise. * lang/python/tests/t-export.py: Likewise. * lang/python/tests/t-file-name.py: Likewise. * lang/python/tests/t-idiomatic.py: Likewise. * lang/python/tests/t-import.py: Likewise. * lang/python/tests/t-keylist.py: Likewise. * lang/python/tests/t-protocol-assuan.py: Likewise. * lang/python/tests/t-sig-notation.py: Likewise. * lang/python/tests/t-sign.py: Likewise. * lang/python/tests/t-signers.py: Likewise. * lang/python/tests/t-trustlist.py: Likewise. * lang/python/tests/t-verify.py: Likewise. * lang/python/tests/t-wait.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Import the topmost module in tests and examples.Justus Winter2016-10-311-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * examples/verifydetails.py: Only import the topmost module 'gpg' and update the code accordingly. * tests/support.py: Likewise. * tests/t-callbacks.py: Likewise. * tests/t-data.py: Likewise. * tests/t-decrypt-verify.py: Likewise. * tests/t-decrypt.py: Likewise. * tests/t-edit.py: Likewise. * tests/t-encrypt-large.py: Likewise. * tests/t-encrypt-sign.py: Likewise. * tests/t-encrypt-sym.py: Likewise. * tests/t-encrypt.py: Likewise. * tests/t-export.py: Likewise. * tests/t-file-name.py: Likewise. * tests/t-import.py: Likewise. * tests/t-keylist.py: Likewise. * tests/t-sig-notation.py: Likewise. * tests/t-sign.py: Likewise. * tests/t-signers.py: Likewise. * tests/t-trustlist.py: Likewise. * tests/t-verify.py: Likewise. * tests/t-wait.py: Likewise. * tests/t-wrapper.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Rename Python module from PyME to gpg.Daniel Kahn Gillmor2016-10-3112-37/+37
| | | | | | | | This follows weeks of discussion on the gnupg-devel mailing list. Hopefully it will make it easier for people using Python to use GnuPG in the future. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* python: Return public keys by default.Justus Winter2016-10-132-2/+2
| | | | | | | | | | * lang/python/pyme/core.py (Core.get_key): Return public keys by default, improve docstring. * lang/python/examples/testCMSgetkey.py: Update example. * lang/python/examples/verifydetails.py: Likewise. GnuPG-bug-id: 2751 Signed-off-by: Justus Winter <[email protected]>
* python: Fix example.Justus Winter2016-10-131-2/+2
| | | | | | | * lang/python/examples/inter-edit.py: Fix example. Fixes-commit: a458e7fe Signed-off-by: Justus Winter <[email protected]>
* python: Adapt to 'gpgme_op_interact'.Justus Winter2016-09-161-11/+4
| | | | | | | | | | | | | | | | | | * lang/python/examples/inter-edit.py: Update example. * lang/python/gpgme.i (gpgme_edit_cb_t): Turn into 'gpgme_interact_cb_t'. * lang/python/helpers.c (_pyme_edit_cb): Turn into '_pyme_interact_cb_t'. * lang/python/private.h (_pyme_edit_cb): Likewise. * lang/python/pyme/constants/__init__.py: Replace numeric status codes with the keywords. * lang/python/pyme/constants/status.py: Likewise. * lang/python/pyme/core.py (Context.interact): New method. (Context.op_edit): Deprecate, update docstring, implement using Context.interact. * lang/python/tests/t-edit.py: Test both interfaces. Signed-off-by: Justus Winter <[email protected]>
* python: Trim imports.Justus Winter2016-09-144-4/+0
| | | | | | | | | * lang/python/examples/encrypt-to-all.py: Drop unused import of 'os'. * lang/python/examples/signverify.py: Likewise. * lang/python/examples/simple.py: Likewise. * lang/python/examples/verifydetails.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Import from __future__ to align behavior of Python 2.7.Justus Winter2016-09-1412-0/+36
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Use more generic shebang.Justus Winter2016-09-1412-12/+12
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Clean up and modernize examples.Justus Winter2016-08-0514-500/+360
| | | | | | | | | | | | | | | | | | | | * lang/python/examples/Examples.rst: Delete file. * lang/python/examples/t-edit.py: Likewise. This is actually a test case and has been moved to 'tests'. * lang/python/examples/assuan.py: New file. * lang/python/examples/decryption-filter.py: Likewise. * lang/python/examples/delkey.py: Modernize. * lang/python/examples/encrypt-to-all.py: Likewise. * lang/python/examples/exportimport.py: Likewise. * lang/python/examples/genkey.py: Likewise. * lang/python/examples/inter-edit.py: Likewise. * lang/python/examples/sign.py: Likewise. * lang/python/examples/signverify.py: Likewise. * lang/python/examples/simple.py: Likewise. * lang/python/examples/testCMSgetkey.py: Likewise. * lang/python/examples/verifydetails.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Drop obsolete VCS keywords.Justus Winter2016-06-0610-10/+0
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Clean up examples.Justus Winter2016-05-179-41/+42
| | | | | | | | | | | | | | | * lang/python/examples/delkey.py: Clean up example. * lang/python/examples/encrypt-to-all.py: Likewise. * lang/python/examples/genkey.py: Likewise. * lang/python/examples/inter-edit.py: Likewise. * lang/python/examples/sign.py: Likewise. * lang/python/examples/signverify.py: Likewise. * lang/python/examples/simple.py: Likewise. * lang/python/examples/t-edit.py: Likewise. * lang/python/examples/verifydetails.py: Likewise. * lang/python/pyme/__init__.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Make test case more robust.Justus Winter2016-05-121-0/+4
| | | | | | * lang/python/examples/t-edit.py: Check if key is found. Signed-off-by: Justus Winter <[email protected]>
* python: Fix type translation.Justus Winter2016-05-121-3/+3
| | | | | | | | | | | | * lang/python/gpgme.i: Adjust to Python3's string type being 'Unicode', not 'bytes'. Fix type checking. * lang/python/core.py (Data.write): Add docstring mentioning the expected type of parameter 'buffer'. (Data.read): Adjust read loop. Also, use a saner chunk size, and join all chunks at the end instead of adding them. * lang/python/examples/simple.py: Adjust example. Signed-off-by: Justus Winter <[email protected]>
* python: Fix simple example.Justus Winter2016-05-111-1/+2
| | | | | | | * lang/python/examples/simple.py: Flush stdout, encode name as UTF-8 before passing it to GPGME. Signed-off-by: Justus Winter <[email protected]>
* python: PEP8 fixes.Justus Winter2016-05-104-33/+38
| | | | | | Cherry picked from 0267c151. Signed-off-by: Justus Winter <[email protected]>
* python: Delete trailing whitespace.Justus Winter2016-05-105-8/+4
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Rename bindings.Justus Winter2016-05-1012-0/+655
-- Signed-off-by: Justus Winter <[email protected]>