the WX related python code