zx:~ zx$ which python/usr/bin/python
2.打開Xcode,新建工程,選擇 "Other"| "Externail Building System".python
3.BuildTool填入 "/usr/bin/python"chrome
4.先建一個test.py文件,輸入markdown
print "hello,world";
5.EditScheme中,選中Run後須要作三件事情:ui
5.1 Info中,BuildConfiguration選擇Debug; Executable選擇/usr/bin/python文件;不勾選"Debug Executable"spa
5.2 Arguments中,啓動參數添加文件名"test.py"code
5.3 Options中,勾選Working Directory下的自定義目錄,而後選擇test.py所在的目錄.get