http://www.zhihu.com/question/19872198
打开Xcode,File->New->Project
选中OS X下的Other点击External Build System 然后Next。Build Tool填写你的python解释器,如/usr/bin/python创建工程后,File->New->File->OS X->Other ->Empty->Next。创建好后,点选菜单栏Product->Edit Scheme。更改RUN->Info->Executable选项为/usr/bin/python。可以直接Cmd+Shift+G快捷键进行输入回车即可 。Debugger项选为None。然后点RUn->Arguments->Arguments Passed On Launch下的+号添加你的code file路径。最后OK返回即可