compatiable for python mode on windows