singpolyma / OpenPGP-Python

A port of OpenPGP-PHP to Python
ISC License
34 stars 8 forks source link

Completed ASCII armor support #9

Closed dlmueller closed 10 years ago

dlmueller commented 10 years ago

I've added the 'enarmor' function including a unit test.

Currently the public API visible via "dir(OpenPGP)" is polluted with imported standard modules. A user of OpenPGP-Python might think they belong to the "intentinally published API" an uses them, e.g. "OpenPGP.unpack".

This problem could be solved when those module are renamed on import with a leading underscore using the "as"-keyword. This way they would be hidden in the result of "dir(OpenPGP)". So only the real published API remains visible. I think that would clarify usage a lot.

singpolyma commented 10 years ago

So, I have to import everything I import with a name change to keep it from being exported? Python has no other way to limit that?

singpolyma commented 10 years ago

The new test fails on Python 3

singpolyma commented 10 years ago

Also, thanks for working on this!

dlmueller commented 10 years ago

So, I have to import everything I import with a name change to keep it from being exported? Python has no other way to limit that?

My fault. The following statements should be correkt:

dlmueller commented 10 years ago

I've resolved the Python 3 issues (testet with Python 3.4.1).