1

I would like to embed Python (in a Cocoa App under Mac OS X Mavericks). I have several Pythons installed and would like to set the one used in the App specifically. How do I do that? I tried it via Py_SetProgramName("path/to/python") but when I check Py_GetProgramFullPath() it returns something different than defined with Py_SetProgramName().

jeb
  • 78,592
  • 17
  • 171
  • 225
DaPhil
  • 1,509
  • 4
  • 25
  • 47
  • You don't use the python executable when embedding Python. You just link to the correct library (.so in your case, I guess), hence it's a matter of setting the right compiler/linker switches. – Stefan Näwe Mar 03 '14 at 13:03
  • @StefanNäwe And if I want to allow the user to set the python executable they want? Say they only have the system python installed, then they use that by default. If they have manually installed something else, they can specify where the executable is. – DaPhil Mar 03 '14 at 13:10
  • Please read again: *You don't use the python executable when embedding Python*. Period. – Stefan Näwe Mar 03 '14 at 14:02

0 Answers0