Python with Xcode
In this tutorial, I’ll show how to execute and run Python codes with Xcode.
1. Open up Xcode. Applications ▸ Xcode
2. Click on Create a new Xcode project
3. Select Other - External Build System
4. Give a Product Name, such as ‘python’
5. Now open up Terminal. Applications ▸ Utilities ▸ Terminal. And run the command ‘which python’. You’ll get the python directory from there. Copy it
6. Now go back to Xcode, and paste the python directory in Build Tool
7. Save the project in Desktop
8. Now go to Product - Scheme - Edit Scheme
9. Under Edit Scheme menu, click on Run - Info. Locate the Executable to python. Under Executable, you can tap shift+command+G and paste the previously copied directory here in the field to get a quick access to the python bin file. And uncheck Debug executable
10. Now in Run - Arguments, add a Arguments Passed On Launch; such as ‘python.py’
11. In Run - Options, change the Working Directory to the Desktop folder python. This folder was created when we saved our Xcode project in Desktop
12. Now open a new file in Xcode. File - New - File… - Other - Empty
13. Save it as ‘python.py’ . The same name that we defined in Arguments. Make sure the python target is checked. Click Create and you’ll be headed towards the code editor
14. Now write a python code and run it
Now that your Xcode is all set to execute and run Python codes.
Other Details-
1. OS- OS X Yosemite 10.10
2. Xcode version- 6.1 -- https://itunes.apple.com/us/app/xcode...
3. Screen recorder- ScreenFlow 4.5.2 -- https://itunes.apple.com/us/app/scree...
4. Post editing- Final Cut Pro 10.1.3 -- https://itunes.apple.com/us/app/final...
5. Background music- Lightin, album- See U by Antony Raijekov -- https://www.jamendo.com/en/list/a3529...
Tariqul Dipu
http://www.tariquldipu.net
On this page of the site you can watch the video online Python with Xcode with a duration of hours minute second in good quality, which was uploaded by the user Tariqul Dipu 03 November 2014, share the link with friends and acquaintances, this video has already been watched 13,803 times on youtube and it was liked by 98 viewers. Enjoy your viewing!