在xcode中编辑运行python代码

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.

上一篇:Apache Log4j使用实例


下一篇:编程实战——电影管理器之XML存储电影信息数据