python mode changes