Xcode搭建Python编译环境

Xcode搭建Python编译环境

  1. 确认安装了python
   
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

  1. over,运行就能够获得 hello,world.

参考资料: https://www.youtube.com/watch?v=d6VRvLjcPfUit

相关文章
相关标签/搜索