Changes for python mode