integrating the web UI with python