[FIX] fixed issue with python shell startup on mac os x + cleanup