Changed ifmain python snippet