Configuring the Python development environment under XCODE5
1: Python's development library is already integrated under the default Mac, first find the directory of the Integrated Python Library
Terminal which Python
Note the current Python path/usr/bin/python
2:xcode New Project----OSX-----Other-----External Build System---Next
Fill in the project name and fill in the Build Tool with the python path you just found--next
3: New program file;
Xcode---File----New-------OSX----Other----Empty----Next
Save as fills in hi.py complete
4: Configure Project Scheme
Open Project Edit Scheme
The Info Bar is modified as follows:
Executable change None to other and in the Open box, Command + Shift + G to bring up the fill in the Path box, enter the python path above/usr/bin/python find Python Go Save
Debugger changed from Lldb to None
Arguments column Arguments Passed on Lanuch Click + Sign Add, the above created hi.py file;
In the Options section, working directory check the use Custom working directory and select the directory where you just created the hi.py in the directory below, and the other is the HelloWorld project directory
5: Edit hi.py start writing test program
A Hello world first.
print ' Hello World '
Commang + R operation, you can see the log output of the console
XCODE5 Python development environment