some changes for python mode
python mode changes