Http://jingyan.baidu.com/article/f71d60379c73001ab741d14e.html
For those of you who are just getting started with a Mac, it's important to be curious whether you can use the IDE tool to integrate the Python language, the answer is yes! There are a lot of posts in the network that use XCODE5, and now I'll tell you how to do it in Xcode6.
Tools/Materials
Environment construction
- 1
Locate the path where Python is installed on your computer. OSX system has Python installed by default, the default path is/usr/bin/python. In case of uncertainty, you can also open the command line and view it with the which Python command.
- 2
Open Xcode6, select File->new->project, and the new Project menu will pop up.
- 3
From the Project menu, select "Build External System" Under the Other tab, then click "Next"
- 4
Fill in the "Product Name" and "Build Tool" two items by the image, click "Next"
- 5
Click on the menu Product->scheme->edit Scheme ...
- 6
Under the Info tab
1, modify excutable, select "Other", and then in the popup dialog box Press/Key, enter "/usr", open the hidden folder usr, step by step to find/usr/bin/python/python this program
2. Modify Debug
- 7
tab arguments, in the first arguments passed on launch, create a new. py file that you are about to create, such as main.py
- 8
tab option, tick working directory and select the folder where Xcode project is located, which is where your. py file is stored, and finally determine
END
Run Tests
- 1
Right-click on the project, select New file to create the files, and you need to select the Others tab under OS X, the file type is empty, the name needs to be the file name you just added in scheme, for example main.py
- 2
Write the code and click Run, you can implement the Python program under Xcode compile and run.
END
experience content is for reference only, if you need to solve specific problems (especially in the areas of law, medicine, etc.), we recommend that you consult the relevant professionals in detail. ReportAuthor's statement: This experience is based on the actual experience of the original, without permission, declined reproduced.
Build a python development environment in XCODE6