[PyKDE] Multiple PyQt version in one Python installation

Simon Edwards simon at simonzone.com
Sat Nov 4 19:47:42 GMT 2006


Hello,

One of the things that I would like to see in PyKDE 4 is the possibility to 
install different versions PyQt into the same Python installation in the 
event that backward compatibility in libsip needs to be broken.

Anyway, I've done a bit of exploratory programming regarding making it 
possible to install and use two versions of SIP+PyQt which use a different 
libsips. The idea is that different versions of PyQt could be installed as 
different modules (PyQt_v4, and PyQt_v5 for example), and using a couple of 
module loading tricks it should be possible for PyQt4 programs to work so as 
they now work. Python programs that contain a C++ class compiled against a 
specific version of libsip, can then specify which version of libsip they 
need.

To illustrate by example:
	...
	from PyQt import QtCore
	...

Gets the default latest PyQt version, while this explicitly requests a the 
installed version of PyQt that uses sip2.

	...
	import sip2
	from PyQt import QtCore
	...

Later the program could load its own C++ class that uses the same version of 
libsip without the whole thing blowing up.

My experiment is in the zip file attached to this email. (I hope it gets 
through to the list).

This would be very useful for PyKDE and KDE 4. Phil, what do you think?

cheers,

-- 
Simon Edwards             | KDE-NL, Guidance tools, Guarddog Firewall
simon at simonzone.com       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyqt_versioning.zip
Type: application/x-zip
Size: 3375 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061104/07cbf0ca/pyqt_versioning.bin


More information about the PyQt mailing list