[PyKDE] ANN: SIP v4.0pre1 Released

Rune Hansen rune.hansen at viventus.no
Sat Oct 18 01:55:00 BST 2003


On lørdag, okt 18, 2003, at 01:36 Europe/Oslo, Phil Thompson wrote:

> On Saturday 18 October 2003 12:28 am, Rune Hansen wrote:
>> On lørdag, okt 18, 2003, at 01:00 Europe/Oslo, Phil Thompson wrote:
>>> On Friday 17 October 2003 11:47 pm, Rune Hansen wrote:
>>>> On lørdag, okt 18, 2003, at 00:07 Europe/Oslo, Phil Thompson wrote:
>>>>> On Friday 17 October 2003 10:12 pm, Willard Myers wrote:
>>>>>> On Oct 17, 2003, at 16:49, Rune Hansen wrote:
>>>>>>> $PYTHON/site-packages has these qt files:
>>>>>>> qt.dylib
>>>>>>> qtgl.dylib
>>>>>>> qtsql.dylib
>>>>>>> qtui.dylib
>>>>>>> qtcanvas.dylib
>>>>>>> qtnetwork.dylib
>>>>>>> qttable.dylib
>>>>>>> qtxml.dylib
>>>>>>> ...and nothing else...
>>>>>>>
>>>>>>> Can't help but think I've made an error....some where :-)
>>>>>>
>>>>>> That's most of the way there, you are missing qt.py, etc. Did you
>>>>>> run
>>>>>> the install step?
>>>>>
>>>>> No - it looks right to me. SIP v4 doesn't generate any .py files.
>>>>>
>>>>> Have you actually tried to import a module. If the canvas.py  
>>>>> example
>>>>> works
>>>>> then everything is probably Ok.
>>>>
>>>> canvas.py from examples3/canvas :
>>>>
>>>> Traceback (most recent call last):
>>>>    File "canvas.py", line 4, in ?
>>>>      from qt import *
>>>> ImportError: No module named qt
>>>>
>>>>> Does Python on the Mac use a different file extension for compiled
>>>>> modules?
>>>>> (Like the Windows version uses .pyd?)
>>>>
>>>> uhm..I'm not especialy famillilar with the .pyd concept. Python file
>>>> extensions on the Mac is .py, .pyc and .pyo as far as I know.
>>>>
>>>> I had, kind of, expected these files: "qtcanvas.py, qtext.py,  
>>>> qtgl.py,
>>>> qtnetwork.py, qt.py, qtsql.py, qttable.py, qtui.py and qtxml.py" to  
>>>> be
>>>> present in my site-packages catalog after the PyQt install...but
>>>> they're not.
>>>
>>> Like I said SIP v4 doesn't generate them.
>>>
>>> Can you try renaming the .dylib files so that they have a .so
>>> extension and
>>> see if they get imported.
>>>
>>> Phil
>>
>> Yes!
>> python2.3 canvas.py
>> Qt: QApplication: Warning argv[0] == 'canvas.py' is relative.
>> In order to dispatch events correctly Mac OS X may require  
>> applications
>> to be run with the *full* path to the executable.
>> QMenuBar: Not sure how to handle accelerator 0x1010 (Home)
>> QMenuBar: Not sure how to handle accelerator 0x1010 (Home)
>>
>> The canvas window pops up. It's in the background and does not seem to
>> receive events. But hey, it works :-)
>> I've tried to run several of the other examples and I get the same
>> result.
>>
>> I fired up one of my larger apps giving the full path to the start
>> file. It no longer prints the warning, but the result is the same.
>> The application it self  works tough, I just can't interact with it.
>>
>> btw. on my 867mhz 12" Powerbook with 640mb ram, "from qt import *"
>> takes aprox 8 seconds.
>
> How long does it take the second time?
>

Three consecutive runs
time python2.3 imp.py where imp.py only contains one line : "from qt  
import *"

real    0m9.746s	
user    0m8.930s
sys     0m0.180s

real    0m9.009s
user    0m8.230s
sys     0m0.270

real    0m9.467s
user    0m8.590s
sys     0m0.230s

>
>> That's it for tonight. I'll do some more testing tomorrow. Thanks  
>> Phil!
>
> Try the Mac equivalent of /path/to/python canvas.py.
>

[roderik at Luggage examples3]$ /usr/local/bin/python2.3  
/Users/roderik/build/pyqt/PyQt-x11-gpl-snapshot-20031016/examples3/ 
canvas/canvas.py
QImage::smoothScale: Image is a null image
QImage::smoothScale: Image is a null image
QImage::smoothScale: Image is a null image
QMenuBar: Not sure how to handle accelerator 0x1010 (Home)
QMenuBar: Not sure how to handle accelerator 0x1010 (Home)

Result: The canvas does not receive any events.
(Mac OSX is basically a BSD machine, with some Apple oddities of  
course.)

> Phil
>

regards
/rune




More information about the PyQt mailing list