您的位置:首页 > 编程语言 > Python开发

在xcode中编辑运行python代码

2013-08-05 14:41 411 查看
http://www.douban.com/group/topic/22765904/
http://www.zhihu.com/question/19872198
In the menu bar, click "File" → "New" → "New Project…".

- Select "Other" under "Mac OS X".

- Select "External Build System" and click "Next".

- Enter the product name.

- For the "Build Tool" field, type in FULL path of your python and then click "Next".

Choose where to save it and click "Create".

- In the menu bar, click "File" → "New" → "New File…".

- Select "Other" under "Mac OS X".

- Select "Empty" and click "Next".

- Navigate to the project folder (it will not work, otherwise)

- Enter the name of the Python file (include the ".py" extension), and click "Save".

- In the menu bar, click "Product" → "Edit Scheme…".

- Click "Run" in the left column.

- In the "Info" tab, click the "Executable" field and then click "Other…".

- Navigate to the executable of your python. You may need to use ⇧⌘G to type in the directory if it is hidden.

- Select the executable and click "Choose".

- For the "Debugger" field, select "None".

- In the "Arguments" tab, click the "Base Expansions On" field and select the target you created earlier.

- Click the "+" icon under "Arguments Passed On Launch". You may have to expand that section by clicking on the triangle pointing to the right.

Type in "$(SOURCE_ROOT)/" and then the name of the Python file you want to test.

- Remember, the Python program must be in the project folder. Otherwise, you will have to type out the full path here.

- Click "OK".

- Start coding.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: