Running Python in Xcode: Step by Step — Erica Sadun

Thank you, thank you, thank you, Erica!

Now, click the Arguments tab. Click + under “Arguments Passed On Launch” and type $(SRCROOT)/ followed by the name of the Python file you created in Step 4.

Source: Running Python in Xcode: Step by Step — Erica Sadun