Used "inspiration" from the simple python plugin by activestate