Python with Xcode

preview_player
Показать описание
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
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
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

Tariqul Dipu
Рекомендации по теме
Комментарии
Автор

Thanks a lot i was looking for that for 3 days.

bilmektefaydavar.
Автор

Hi, how do I add another python file to the project ?
File > New > test2.py runs but prints out test.py’s code. Is there any way to do it, or do I have to create new project for each new .py file I want to add. Thank you.

PAOK
Автор

Thanks a lot for making this. Keep up the good work. :)

emnoor
Автор

When I get to 0:50 and enter the key combination shown in this tutorial it does not bring me to a window that asks me to enter the pathway.  Is there another method of entering the pathway?

Sjester
Автор

thank you first i watched videos but mine was not working but with the music i did every thing step by step and it worked

AbhishekGupta-xhsi
Автор

can anyone help me set this up with Xcode 9 and python 3.6?

userbdtgry
Автор

Can I actually publish this app to the App Store, or is this just how to turn Xcode into a python IDE? I am using Kivy and want to build an app in python.

crypticdeez
Автор

Python though Xcode dont accept input. So..unfortunately this's unusable

blindox
welcome to shbcf.ru