Re: [PyKDE] Support for Qt v1.x and Qt v2.x
On Fri, 25 Feb 2000, you wrote: I've asked this of a few people before the mailing list was created... The way things are structured at the moment it is going to be a pain to have PyQt for Qt v1.x and PyQt for v2.x installed at the same time. How important is this to people? Unfortunately Python doesn't have Tcl's ability to nicely handle different versions of an extension module. One way would be for the Python module that supports Qt v2.x to be called "qt2" rather than "qt". The disadvantage is that a script that is portable between versions would need to specify "import qt" or "import qt2" when it shouldn't need to make the distinction. Another way would be to have "qt1" and "qt2" and a symbolic link "qt" that pointed to the latest available version. A script that was specific to a version would "import qt1" or "import qt2", portable scripts would "import qt". The disadvantage is that existing scripts that aren't portable to Qt v2.x would break when Qt v2.x was installed. Ideas, suggestions, opinions? I've KDE 1 and KDE 2 installed in such a way that I can run applications of both versions at the same time, but the desktop is still KDE 1 and I use KDE 2 only when I test KDbg for Qt2/KDE2 :-) Having PyKDE in both versions is not important for me, however. It would be ok for me to have PyQt/PyKDE for Qt2/KDE2 while everything else on my desktop is still Qt1/KDE1. -- Hannes
Re: [PyKDE] Support for Qt v1.x and Qt v2.x
Two choices: 1. Have the application do an "import qt2" (in only a single file). qt2 could then modify the toplevel namespace so that "qt" and "qt2" are equivalant (I don't know how to do this). (Same thing for kde) 2. Modify qt 1 so when it is initially loaded (__init__.py) if either some Python variable is true or some environment variable is set then use qt2.0 (same thing for kde) Pmw actually supports simultaneous versions by putting them all under a common directory. The following is the file Pmw/__init__.py: # This file is executed when the Pmw package is imported. It creates # a lazy importer/dynamic loader for Pmw and replaces the Pmw module # with it. Even though the loader from the most recent installed # version of Pmw is used, the user is able to specify which version of # Pmw megawidgets to load by using the setversion() function of the # loader. # This is the only file in Pmw which is not part of a particular Pmw # release. --pete
[PyKDE] Support for Qt v1.x and Qt v2.x
I've asked this of a few people before the mailing list was created... The way things are structured at the moment it is going to be a pain to have PyQt for Qt v1.x and PyQt for v2.x installed at the same time. How important is this to people? Unfortunately Python doesn't have Tcl's ability to nicely handle different versions of an extension module. One way would be for the Python module that supports Qt v2.x to be called "qt2" rather than "qt". The disadvantage is that a script that is portable between versions would need to specify "import qt" or "import qt2" when it shouldn't need to make the distinction. Another way would be to have "qt1" and "qt2" and a symbolic link "qt" that pointed to the latest available version. A script that was specific to a version would "import qt1" or "import qt2", portable scripts would "import qt". The disadvantage is that existing scripts that aren't portable to Qt v2.x would break when Qt v2.x was installed. Ideas, suggestions, opinions? Thanks, Phil