Friday, April 4, 2014

Embed a Python Distribution in X-Code project

Today I bumbled through embedding a python in my X-Code project. The end goal is to enable the user to write some little custom tools in python, from within the app, as opposed to a more syntactically onerous or confusing language. I didn't want to rely on the user's system python, since I want to include some custom libraries, and also because it is generally discouraged. As a guide, I followed http://stackoverflow.com/questions/21624324/getting-python-to-work-in-cocoa-app/21666249#21666249

A high level overview of the process:

  • download python source and compile it
  • copy that stuff to X-code
  • tell X-code some various particulars, like where to find things