Python class to work with tomcat