Re: [Pythonmac-SIG] Catching exceptions inside python with catch_exception_raise() doesn't work

2006-12-12 Thread Ronald Oussoren
Hi, I haven't used the raw mach API's yet, so can't help you here. I must say that this looks like a pretty evil API. I wonder why they didn't use a manually passed in callback function like sane APIs. Ronald On Dec 11, 2006, at 11:43 PM, Charlie Miller wrote: Is it possible to monitor f

Re: [Pythonmac-SIG] cyptes problem on MacOS X

2006-12-12 Thread Ronald Oussoren
On Dec 11, 2006, at 9:20 PM, Russell E. Owen wrote: I've been trying out ctypes (from MacPython 2.5) on MacOS X on a PPC Mac and have run into a problem. I hope I'm just doing something stupid, but it seems to match the tutorial so I'm really puzzled: I can reproduce this on an intel syst

Re: [Pythonmac-SIG] cyptes problem on MacOS X

2006-12-12 Thread Hubert Holin
Paris (U.E.), le 12/12/2006 Bonjour On Mon Dec 11 21:20:23 CET 2006, Russell E. Owen wrote: > Other suggestions are welcome. We'll mostly be interfacing to C++ so > I've considered trying out Boost, but it hasn't had an update in years > which worries me. Robustness, ease of use and spee

[Pythonmac-SIG] Best/Safest way to parse NumPy array in C extension?

2006-12-12 Thread Lou Pecora
I've done this two ways. Which is better or safer? Say I'm passing a NumPy array (float) to a C extension. One way to "parse" it is (ignoring checks on return values, etc. for now), PyArrayObject *mat; PyArg_ParseTuple(args, "O!", &PyArray_Type, &mat); or is this better, PyObject *Pymat

Re: [Pythonmac-SIG] [SciPy-user] Best/Safest way to parse NumPy array in C extension?

2006-12-12 Thread Lou Pecora
YIKES. That one line should read mat=PyArray_ContiguousFromObject(Pymat,NPY_DOUBLE,2,2); Very sorry. --- Lou Pecora <[EMAIL PROTECTED]> wrote: > I've done this two ways. Which is better or safer? > > Say I'm passing a NumPy array (float) to a C > extension. One way to "parse" it is (ignorin

Re: [Pythonmac-SIG] [SciPy-user] Best/Safest way to parse NumPy array in C extension?

2006-12-12 Thread Christopher Barker
Lou, This type of question is best posed on the numpy list: http://projects.scipy.org/mailman/listinfo/numpy-discussion Lou Pecora wrote: >> PyArrayObject *mat; >> PyArg_ParseTuple(args, "O!", &PyArray_Type, &mat); If you do this, you then need to check and see if the array that got passe

Re: [Pythonmac-SIG] [SciPy-user] Best/Safest way to parse NumPy array in C extension?

2006-12-12 Thread Lou Pecora
Thanks for the answers, Chris. A few comments and questions beyond what I asked and you answered: --- Christopher Barker <[EMAIL PROTECTED]> wrote: > Lou, > > This type of question is best posed on the numpy > list: > > http://projects.scipy.org/mailman/listinfo/numpy-discussion Ah, yet anoth

Re: [Pythonmac-SIG] py2app plugin problem: "Error loading code"

2006-12-12 Thread Dethe Elza
On 10-Dec-06, at 1:37 PM, Ronald Oussoren wrote: > The problem is that py2app/bundletemplate/prebuild/main in the > py2app distribution is an intel-only binary (at least in the > current trunk) instead of a universal binary. > > Removing the file and running 'setup.py' in the bundletemplate