[Pythonmac-SIG] PyQt 3.8.1 on MacOS X 10.1 hobbles

Bob Ippolito bob at redivi.com
Sun Nov 9 07:14:38 EST 2003


On Nov 9, 2003, at 6:31 AM, Markus Biermaier wrote:

> Hello,
>
> My Application ("ImageBrowser") was developed with focus FOR the Sharp 
> Zaurus and works fine.
> It was compiled ON a Linux-PC and hence works also on Linux.
>
> The third platform (my main platform) I'm working on is MacOS.
> I've got it running on MacOS 10.1 and have a strange phenomen:
>
> ------------------------------ [ BEGIN Python-RuntimeError ] 
> ------------------------------
> markus at macosbw:~/Packs/PyQt-mac-gpl-snapshot-20031027/examples3 > 
> aclock.py
> Traceback (most recent call last):
>   File "./aclock.py", line 4, in ?
>     from qt import *
> RuntimeError: Attempt to create a Python instance for a NULL pointer
> ------------------------------ [ END   Python-RuntimeError ] 
> ------------------------------
>
> If I do "import qtui" before the "from qt import *" qt imports OK.
> So my fix for all PyQt files looks like this and works:
>
> ------------------------------ [ BEGIN Head of 'aclock.py' ] 
> ------------------------------
> #!/usr/bin/env python
>
> import sys
> import qtui
> from qt import *
>
> def QMIN(x, y):
>   if y > x: return y
>   return x
> ------------------------------ [ END   Head of 'aclock.py' ] 
> ------------------------------
>
> Of course I launch the application from the shell via "open *.py". 
> This works fine.
>
> My configuration:
> OS:   MacOS X 10.1.5
> QT:   qt-mac-free-3.2.2
> PyQt: PyQt-mac-gpl-snapshot-20031027
> Sip:  sip-mac-gpl-4.0pre3
>
> Any ideas? Perhaps someone knows this behavio(u)r....

I didn't know anyone still used 10.1 :)  Most of us are only used to 
looking at 10.2 issues, and many of us, including myself, have moved to 
10.3.

Nobody mentioned that PyQt  and Sip were finally available for Mac, at 
least not on this list, so I don't think anyone here is familiar with 
it yet.  This bug sounds specific to PyQt Mac, but maybe it's something 
to do with 10.1 and whatever version of Python you are using.

If you don't run a python script from an executable bundle, it won't be 
able to do GUI stuff (unless it calls undocumented private Apple APIs), 
so that may have something to do with the problem you're seeing.  You 
might have a pythonw script that will do this, but you don't mention 
which version of Python you are using.

-bob




More information about the Pythonmac-SIG mailing list