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

Markus Biermaier mbier at office-m.at
Mon Nov 10 12:20:59 EST 2003


Am Montag den, 10. November 2003, um 13:35, schrieb Jack Jansen:

> Markus,
> first try Bob's suggestions (build qt with thread support, and link 
> statically against the
> qt stuff). If you still have the problem then: your working example 
> tried
> 	>>> import qtui
> 	>>> import qt

That's not correct:
------------------------------ [ 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
class AnalogClock(QWidget):
------------------------------ [ END   Head of 
aclock.py ] ------------------------------

I commented in/out "import qtui"

> and your non-working example
> 	>>> from qt import *
> Could you try the other two combinations too? I.e.
> 	>>> import qtui
> 	>>> from qt import *
> and
> 	>>> import qt
>
> That's just to localize it, maybe it has something to do with the 
> "import *"
> in stead of the load order.

I can reproduce it even interactive and in every situtation:

Interactive:
============

markus at macosbw:~/Python/PyQt/Python-RuntimeError > python
Python 2.3.2 (#10, Nov  4 2003, 20:58:36)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> from qt import *
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
RuntimeError: Attempt to create a Python instance for a NULL pointer
 >>> # OK about 8 secs later second try
...
 >>> from qt import *
 >>> # immediately return
...
 >>>
markus at macosbw:~/Python/PyQt/Python-RuntimeError > python
Python 2.3.2 (#10, Nov  4 2003, 20:58:36)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import qt
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
RuntimeError: Attempt to create a Python instance for a NULL pointer
 >>> # OK about 8 secs later second try
...
 >>> import qt
 >>> # immediately return
...
 >>>

As script:
==========

------------------------------ [ BEGIN CheckPython-
RuntimeError.py ] ------------------------------
#!/usr/bin/env python
#       Created:        Mon Nov 10 17:55:59 CET 2003    by M. Biermaier 
on macosbw
#       Version:        Mon Nov 10 17:58:54 CET 2003    on macosbw
#       $Id: $

import os
os.system ("date")

try:
         import qt
         os.system ("date")
except:
         print "failed"
         os.system ("date")
         import qt
         os.system ("date")
------------------------------ [ END   CheckPython-
RuntimeError.py ] ------------------------------

markus at macosbw:~/Python/PyQt/Python-RuntimeError > 
CheckPython-RuntimeError.py
Mon Nov 10 18:17:18 CET 2003
failed
Mon Nov 10 18:17:26 CET 2003
Mon Nov 10 18:17:26 CET 2003

Markus

----------------------------------------------------------------------
M. Biermaier                                      mbier AT office-m.at
Wiesengasse 15
3011  Untertullnerbach
Austria / Europe                      Web Site: http://www.office-m.at




More information about the Pythonmac-SIG mailing list