L0j1k/optool — pull request #1 by sashahart (2014-03-24 21:54:51+00:00)
Title: Python Cleanups

This PR is sort of fake, as in it's not really a request. I don't care a lot about whether you pull or not. It's mostly just various kinds of tidying in the Python style. If you do pull it, I happily relinquish copyright to the changes so that you retain copyright to the whole thing (as I saw you did not have any license on this yet)

I got bored with this for today, but the next thing I would do is break out the implementations of things like XOR into functions that don't print, for Python-internal use, and then make a quick suite of unit tests for them. The command line implementation would just use this Python-internal API (as could new CLI tools, bots or whatever). Then I would set up tox so I could monitor what versions the tests were passing under, and see if I could make it easily usable on 2.7, 3.2+ which would be a pretty short job as this is already Python3.

... However, I already wrote some of the key functions in my own OTP tool, with some care to reusability and some tests already written for those, and it is boring to write it again. So IF you were interested, I could take a little time to roll some of my existing Python code from my own OTP tool (just not the OTP-specific stuff) together with this into a Python package. Which would make it installable as both an importable library reusable from Python, and a CLI tool wrapping that library. ... But the tradeoff is that then I would want to be a name on copyright and have the MIT license or something like that on it, since I have some work in the code I am proposing to merge in.