title: Embedding Python in an iPhone app
body: <p>So it's a new millennium; Apple has waved their hand; it's now legal to include a Python interpreter in an iPhone (App Store) app.</p>
  
  <p>How does one go about doing this? All the existing discussion (unsurprisingly) refers to jailbreaking. (Older question: <a href="https://stackoverflow.com/questions/43315/can-i-write-native-iphone-apps-using-python">Can I write native iPhone apps using Python</a>)</p>
  
  <p>My goal here isn't to write a PyObjC app, but to write a regular ObjC app that runs Python as an embedded library. The Python code will then call back to native Cocoa code. It's the "control logic is Python code" pattern.</p>
  
  <p>Is there a guide to getting Python built in XCode, so that my iPhone app can link it? Preferably a stripped-down Python, since I won't need 90% of the standard library.</p>
  
  <p>I can probably figure out the threading and Python-extension API; I've done that on MacOS. But only using command-line compilers, not XCode.</p>