Hi folks,
I have a tricky issue with some python extension modules that need to
share symbols between themselves.
The setup: I am creating python modules to wrap a large template-
based C++ image processing library. The fundamental class that each
of these modules needs to be able to create,
>> [need to share symbols across dso boundaries snipped]
>> Any help or suggestions or thoughts would be greatly appreciated,
>
> Don't do that?
>
> Python uses two-level namespaces on OSX, and for a purpose: to avoid
> accidentally picking up a symbol from another extension. IIRC You
> should
>
Thanks for the information, Bob. I appreciate your help.
> Actually it's because Python extensions are bundles. Bundles are
> NOT shared libraries and can not do what you want. Additionally,
> Python on Mac OS X doesn't use dl to load its extensions, it uses
> lower-level means... so the R
Thanks again Bob for the feedback.
> MH_BUNDLE is not MH_DYLIB and neither are ELF. Everything you
> think you know about shared libraries isn't quite the same on Mac
> OS X. I suggest you read up on Mach-O, I don't really have time to
> answer all of your questions about it.
My admittedl
>> (2) Move to using dlopen() to load the libraries instead of
>> NSLinkImage. This might need some minor changes to
>> dynload_shlib.c, and it would need the configure script to be
>> smart enough to choose dynload_next.c on 10.2 and below.
>
> If you come up with a patch for (2) against Pyt
Hi folks,
Despite the fact that dlopen() is available on OS X for 10.3 and
above, the python dl module has not been made available on 10.3 and
10.4.
Specifically, some code in the python setup.py script explicitly
prevents the dl module from being built on darwin even if python sees
dlfcn
Thanks for your feedback, Bob.
>> I don't have access to a 10.2 machine currently, so if someone is
>> able to test this patch on 10.1, 10.2, and/or 10.3, I would be
>> most grateful. I can try to find some 10.2 install disks (and hope
>> that my computer can run 10.2) if nobody has easy acc
>> I think the Mac OS X box on the sourceforge compile farm may be 10.2.
Only if you're a developer on some SF project. Is there a python
project someone can add me to so I can test this (and the dl module)
patch? Or should I register some dummy project?
Zach
> If you come up with a patch for (2) against Python's svn trunk that
> is tested and works on 10.2 then I'll commit it. It's not
> appropriate to make this sort of change against Python 2.4,
> though. *Maybe* for the universal branch that Ronald and I are
> doing, because that's also unl
>> Well, after wasting the better part of a day tracking down a computer
>> capable of running 10.2, installing 10.2 on it, getting the latest
>> updates and the newest 10.2 developer tools, I find that neither
>> python 2.5 from svn (today's snapshot or a checkout from the 8th)
>> *NOR* the svn sn
Hello folks,
Here is a patch to make Python on OS X 10.3 and above use dlopen()
(via dynload_shlib.c) to load extension modules, and to make the dl
module avaliable. It ought to be incorporated into the SVN for python
2.5, if not for further development on 2.4.
If this is an inappropriate c
t there's no reason it should not be applied to the python codebase.
Thanks,
Zach Pincus
Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine
On Mar 20, 2006, at 1:05 AM, Ronald Oussoren wrote:
>
> On 20-mrt-2006, at 4:13, Zacha
This is for Bob Ippolito -
What version of readline comes with the Universal MacPython 2.4.3
release? And is it statically-linked, or is there a readline dylib
somewhere in the python framework?
I ask because Michael Broe reported some problems (see below) with
IPython that I had tracked do
>> This is for Bob Ippolito -
>
> Well it's really for Ronald, I didn't build it. I have no idea.
Sorry! Hopefully Ronald will let us know what version of readline he
used.
Now, in regards to the GDB issue: can anyone with the latest
developer tools who also has the Universal Python build in
>> Now, in regards to the GDB issue: can anyone with the latest
>> developer tools who also has the Universal Python build installed try
>> to run python under gdb? (I have a different install of python 2.4.3
>> that I don't want to nuke by installing the universal build just to
>> test this; other
Well, not to keep this thread going on any more than necessary --
though we do still need to hear from Ronald about what version of
readline was used for the Universal MacPython -- but I have a comment.
> I would think that most gdb users already know how to cross an
> execve, but maybe I'm
>>> Just for fun, what's the point of the execve? Just to choose the
>>> right Python executable?
>>
>> Never mind, I found it on Bob's blog. It's to get around the
>> requirement to have an app bundle if you want to draw on the screen,
>> apparently.
>
> That's right.
>
> Note that this function
>> This is for Bob Ippolito -
>
> No it isn't, Bob didn't build the 2.4.3 release ;-)
Sorry sorry! Thanks for making that build, by the way.
>
>>
>> What version of readline comes with the Universal MacPython 2.4.3
>> release? And is it statically-linked, or is there a readline dylib
>> somewhere
>> So... I have found that IPython exposes a bug in GNU readline 5.1,
>> sadly enough. This bug causes segfaults when the up-arrow key is
>> used under certain situations. Ugh. Fortunately, the extant
>> readline 5.1 patches solve this issue nicely. Hopefully you'll get
>> a chance in the n
> You can build the readline extension separately from Python without
> much fuss. I have a setup.py for it and the extracted source
> sitting in my svn:
> http://svn.red-bean.com/bob/readline/trunk/
Thanks! I didn't know it was that easy.
Also, thanks everyone for your time while this issue
As of Python 2.5a2, python.org python should use dynload_shlib.c on
10.3 and 10.4. I didn't realize that Apple's python was built
differently...
Anyhow, if you want to build your own Py2.4 with dynload_shlib the
patch is pretty easy. You can search for the patch on sourceforge
(it's agains
Hi all,
I've built some scientific command-line tools in Python that I'd like
to be able to distribute to colleagues. This is dead-simple on Windows
-- I use py2exe to make a console application exe (or several), put it/
them on the PATH, and things are good-to-go.
However, from googling,
Hi all,
I've been wrestling with py2app for the last day and am getting pretty
confused/discouraged. If anyone has any suggestions regarding the
following issues I've run across, I would be extremely grateful!
I've tested these with both the SVN version of py2app (and
dependencies like mo
Hi all,
A couple of addenda:
(1) It appears that modules included via the py2app 'includes'
option do not have their full dependencies added. I included a
handful of modules from my main package via the setup.py script:
setup_kws['options'] = {'py2app':{'includes':['mypackage.util',
Hi Chris,
Thanks for your suggestions and help here! I really appreciate it. I
wound up building my own installer packages mush as you suggest below,
which turned out to be pretty simple to do -- good idea!
I haven't tried this, but can you build python from source,
specifying an alternat
Hi Michael,
I see some faint traces on Google of something called "PySight" that
can grab images from iSight cameras. There may be some Apple-provided
frameworks for grabbing iSight images as well, which could be called
via PyObjC. Failing that, I'm sure you can find some C-level webcam
d
thanks a lot for your help. so far i made first steps using PySight
which works fine with my iSight camera.
Cool, I'm glad this worked. I'll have to try PySight out.
i'm able to aquire images and to process them, using code-snippets
from here and there, but i lack an idea of PyObjC and i am
Hi Samantha,
You should probably direct your query to the creators of the software
you purchased... they're the most likely to be able to get this
working for you as soon as possible:
http://www.paperpilots.com/pp_contact.html
Zach
On Mar 14, 2009, at 2:07 PM, Samantha Bess wrote:
To
Hi,
Probably better to:
(1) Ask this on the numpy mailing list, and
(2) Provide a complete, compilable example of the offending code.
Also, you may find it easier to write a pure-C routine and call into
it using ctypes (getting pointers via numpy arrays' ctypes
attributes), or alternately, u
I highly recommend that you use Cython instead:
It is much easier, and you are much more likely to make mistakes with
reference counting, etc, if you do it by hand. Trust me on this.
There are a few version I tried, but because of the very high
mathematical effort I need the fastest solutio
On Oct 28, 2010, at 11:08 AM, Ronald Oussoren wrote:
On 28 Oct, 2010, at 16:21, Dan Ross wrote:
I don't think this is Mac specific, but I wonder if someone could
explain why these two groups of code behave differently:
[code]
colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black',
Consider also Processing (not python, but a learn-to-program environment that
feels a little like a modern LOGO), or the not-dissimilar Python-based NodeBox
environment. There's a lot less filesystem bother (etc.), and I think that both
have built-in IDEs, so both should be more lightweight than
32 matches
Mail list logo