First commit of fully Python version

Signed-off-by: Thomas Hodgson <thomas.hodgson@gmail.com>