diff options
Diffstat (limited to 'lang/python/examples/howto/advanced/cython/keycount.pyx')
-rwxr-xr-x | lang/python/examples/howto/advanced/cython/keycount.pyx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lang/python/examples/howto/advanced/cython/keycount.pyx b/lang/python/examples/howto/advanced/cython/keycount.pyx index f0097db2..2aa636d5 100755 --- a/lang/python/examples/howto/advanced/cython/keycount.pyx +++ b/lang/python/examples/howto/advanced/cython/keycount.pyx @@ -1,3 +1,6 @@ +from __future__ import absolute_import + +import cython import gpg c = gpg.Context() @@ -10,7 +13,14 @@ secnum = len(seclist) publist = list(pubkeys) pubnum = len(publist) +if cython.compiled is True: + cc = "Powered by Cython compiled C code." +else: + cc = "Powered by Python." + print(""" -Number of secret keys: {0} -Number of public keys: {1} -""".format(secnum, pubnum)) + Number of secret keys: {0} + Number of public keys: {1} + + {2} +""".format(secnum, pubnum, cc)) |