set up python mode