Méthode pour créer un environnement Python dans Xcode 6
Python 2
- Open your Xcode, Choose 'Create a new Xcode project'.
- Choose 'Other'option under OS X, then choose 'External Build System'. click Next.
- Enter your product name. eg. MyPython.
- important!! Be careful to fill the blank named 'Build Tool'. We should to fill our Python tool directory. Python2 is '/usr/bin/python'.then, click Next.
- Choose the directory to save your project.Click Create.
- Choose 'Product' -> 'Scheme' -> 'Edit Scheme' on Xcode Tool Bar.
- In the Edit view, choose 'Run' on the left option list.choose 'Info' option on the right,then, Choose 'Executable' -> 'other'.then press key 'command + shift + G', input '/usr/bin/python', click 'Go'.finally choose 'python', click 'Choose'.
- The same in 'Info', unselect the 'Debug executable' option.
- Next, choose the 'Arguments' option, under 'Arguments Passed On Launch', click '+', input your python file name. eg "kqx.py".
- Next, choose the 'Options', select 'Working Directory', choose your Xcode project dirctory.
- OK, it is all. Then close the 'Edit Scheme' View.
- Then, we can create a python project.'Command + N' to choose 'OS X'->'Empty'->Next.Input your python file name. eg "kqx.py". click 'Create'.
- Your can code your python code.~(≧▽≦)/~