xcode5 python 开发环境

在xcode5 下配置 python开发环境

1:默认mac下已经集成了python的开发库,先找到集成的python库的目录

    终端 which python

 记下当前的python 路径 /usr/bin/python

2: xcode 新建工程  ----OSX-----Other -----External Build System---Next

  填入工程名,并在 Build Tool 里面填入刚才找到的python 路径--Next

3:新建程序文件;

   Xcode---File----New-------OSX----Other----Empty----Next

   Save As  填入 hi.py 完成

4:配置 项目 Scheme

    打开项目 Edit Scheme

    Info栏修改如下:

    Executable 把 None 改为 Other 并在打开的框中,Command + Shift + G 调出填入路径框,输入上面的 python路径  /usr/bin/python   找到python Go 保存

    Debugger 由 LLDB 改为 None

 

 Arguments 栏目 Arguments Passed On Lanuch 点击 + 号添加,上面创建的 hi.py文件;

 Options 栏目里面的 Working Directory   勾选 Use Custom working directory 并在下面目录选择刚才创建hi.py所在的目录,其他就是 helloWorld工程目录

5:编辑 hi.py 开始写测试程序

 先来个 hello world

 print 'hello world'

commang + r 运行,就可以看到控制台的log输出了

转载于:https://www.cnblogs.com/cocoajin/p/3948774.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值