Just found this on Nithin Kamath’s blog. An article and a photo essay in Times about Mangalore, my hometown. This stuff seriously makes me homesick. I’ve always thought of going back to Managalore and doing something. Guess its high time I do something about it.
Why on earth do braggarts always turn out to be incompetent?
Its so damn obvious and yet they don’t seem to know about it.
And trying to help them seems to be a futile exercise.
I upgraded to Qt 4.1.4 GPL yesterday. Just did some note taking throught the whole process.
Building Qt Extract Qt zipfile to C:\Qt Create directory C:\Qt\4.1.4 Copy Directory mkspecs to C:\Qt\4.1.4 go to C:\Qt\qt-win-opensource-src-4.1.4 and run "configure.exe -prefix C:\QT\4.1.4" run "mingw32-make" and "mingw32-make install" Now for some reason QtDesigner doesn't work. But then I hate using the same directory for building and installation. So, we need to copy "QtDesigner4.dll" and "QtDesignerComponents4.dll" from "C:\QT\qt-win-opensource-src-4.1.4\bin" to "C:\QT\4.1.4\bin" Check if designer.exe Installing SIP Extract the sip tarball somewhere (I chose C:\Qt ) run "python configure.py -p win32-g++" run "mingw32-make" and "mingw32-make install" PyQt4 For PyQt4 to compile, just like the Designer Dlls, we need to copy the QtCore lib into the new PyQt4 install directory. copy "libQtCore4.a" from "C:\QT\qt-win-opensource-src-4.1.4\lib" to "C:\Qt\4.1.4\lib" Then run "python configure.py" run "mingw32-make" and "mingw32-make install"
One of the biggest woes Sreeram had with Twisted was that Deferreds were not cancelable in Twisted. He’s always held the opinion that Deferreds are not deferreds without cancelability. I’ve always held the opinion that not everything is cancelable, and cancelability is only required for long running operations (say downloading a large file or a DB txn). DB txns already have this capability and for long running network ops, there’s the consumer-producer api.
Now, I don’t want to downplay the importance of cancelers. Its a real good thing. Its like a line from the the user code into the deferred object to control it before it fires off. But then, I can’t hate a framework just because it lacks one feature that I love. What about all the other goodness which comes with Twisted for free ? I guess its more of a philosophical thing. I don’t like something, so lemme just go rewrite my own implementation which complies with my beliefs. But I seriously doubt the efficacy of this approach in the long run. I often tend to take this road too. But sometimes the realist in me holds me back. I guess its bad to be too much of a perfectionist
I might as well argue that the ability to chain callbacks and seperation of callbacks and errbacks Twisted Deferreds are all to important. Our home grown Nitro takes a very simplistic approach, every Deferred (called AsyncOp in Nitro) has only two attributes a callback and a canceler. If the programmer needs chaining, he has to implement his own scheme.
Another thing I have been thinking about is the single shot behavior of Twisted Deferreds, which I consider is a good thing. OTOH, in Nitro, AsyncOps are also used to implement things like LoopingCall in Twisted. Then there’s this setTimeout thing which we don’t want to talk about
And recently I’ve found a patch on the Twisted Tracker which adds cancelability to deferreds.
PS: I’m expecting a some flak for this rant.
I’ve been trying to get the latest PyQT4 GPL snapshot with QT 4.1.2 working with Mingw32 on a windows box. Had a little bit of trouble in the process, so writing this log so that anyone else who tries this wouldn’t end up wasting time like I did
Ingredients:
1) Python 2.4.3
2) Mingw
3) QT4 GPL src for Windows (get the zip file, not the exe )
4) PyQt4
Start with compiling QT. extract the zip file to some directory and then go to that directory and run “configure -prefix C:\QT\4.1.2″ Its also a good idea to append a “-release” flag to save time by avoiding building the debug version of the libraries.
Once done, run “mingw32-make” and then “mingw32-make install”.
We also need to set two environment variables, QTMAKESPEC and QTDIR
Set QTMAKESPEC to “win32-g++” (without the quotes)
and set QTDIR to the prefix directory specified to configure (In my case, it was “C:\QT\4.1.2″, again without quotes)
Also remember to add the install-path\bin (“C:\QT\4.1.2\bin”) to the PATH
So we’ve got QT installed.
Next up, getting PyQT4 working. extract the PyQt4 zipfile to some directory and run “configure.py”. For some reason, this doesn’t work. PyQt4 looks for libQtCore4.a in “C:\QT\4.1.2\lib” but it isn’t created by the QT.
So, we get pexports and create it.
Download the zip file and extract pexports.exe to the MingGW bin directory.
Then, fire up command prompt and go to the “C:\QT\4.1.2\bin” directory.
type in the following commands
pexports QtCore4.dll > QtCore4.def
dlltool –dllname QtCore4.dll –def QtCore4.def –output-lib libQtCore4.a
move libQtCore4.a ..\lib
Now just go to the PyQT directory
run
configure.py
mingw32-make
mingw32-make install
Thats it! We’ve got PyQT installed, provided you did’nt get any further errors ![]()
Try running a hello world program from the PyQT4 examples directory.
There’s only one problem I’ve encountered. I haven’t been able to get QT Designer to work.
But I can always go back to Linux for that
