split up web and python code