revamped python mode