adding legacy python code

Signed-off-by: Eric <erich@xaos-ia.com>