[Pythonmac-SIG] embed python in cocoa

2008-05-19 Thread Jerry Isdale
Georg wrote: Hello, I want wo be able to make my program scriptable with python. My program is written in ObjectC in XCode 3 (target only for MacOSX 10.5). I want to embed it and use Py_Initialize(); PyRun_SimpleString(". Can anyone give me some advice how I wrap my cocoa classes to be

[Pythonmac-SIG] Using Mac system fonts with matplotlib?

2008-05-19 Thread Nicholas Matsakis
I'm looking for some guidance on using system-installed truetype fonts with matplotlib. I asked this question on the matplotlib mailing list, but it didn't garner any responses. Here's what I've found so far, using the PDF backend in matplotlib 0.91.2 on 10.5/leopard's native python 2.5 (inst

Re: [Pythonmac-SIG] Carbon bindings' future

2008-05-19 Thread Ronald Oussoren
On 19 May, 2008, at 16:36, Daniel Miller wrote: Ronald, This version is now merged into urllib and commited as revision 63159 in the trunk. Ahh, sorry I'm late. I was on vacation last week when you posted this. Here's an updated version with a bit less duplication (about 55 lines remo

Re: [Pythonmac-SIG] Carbon bindings' future

2008-05-19 Thread Daniel Miller
Ronald, This version is now merged into urllib and commited as revision 63159 in the trunk. Ahh, sorry I'm late. I was on vacation last week when you posted this. Here's an updated version with a bit less duplication (about 55 lines removed). This seems like it will be much easier to mai

Re: [Pythonmac-SIG] embed python in cocoa

2008-05-19 Thread Georg Seifert
I didn’t make myself clear what I want to do: I have a app written in ObjectC and want to embed python to be able to run scripts from within my app. The user should be abel to write his own scripts to modify the model data. So I need to expose the data- classes to python. for c++ it is des

Re: [Pythonmac-SIG] embed python in cocoa

2008-05-19 Thread Jack Nutting
> Can anyone give me some advice how I wrap my cocoa classes to be able to > access them from within the python script? > > I found the examples on how to wrap c/c++ functions but nothing about > ObjectC. You'll want to use PyObjC: http://pyobjc.sourceforge.net/ Already included in Leopard, so

Re: [Pythonmac-SIG] locating Python.h

2008-05-19 Thread Feat
>At 13:43 -0700 2008/05/14, Michael VanLandingham wrote: >>If you're not using Xcode, and instead are using gcc on the command line or >>makefile, then you need to add the right flags so that it can find the >>framework, etc. > >The Python framework that ships with OS X is already in the search p