python Syndicate content

warning: Creating default object from empty value in /www/htdocs/w0065fc9/milianw/modules/taxonomy/ on line 33.

» KDevelop Hack Sprint 2009 - Day 2 and 3

Thu, 04/23/2009 - 01:31

Ok, just a quick update on what we are doing / have done the last two days except drinking beer and eating quite a lot of food (though it never seems to be enough somehow….)

  • Apol was polishing CMake support, speeding up KDevelop startup time when you enabled the QtHelp plugin, making sure that Kross plugins get loaded properly and some other things
  • Adymo started some refactoring of Sublime in an experimental branch (actually they had quite a long discussion right now about things in the UI which should be changed/fixed). Besides that he also fixed some little bugs in the includepath resolver for CMake
  • Nsams is fixing PHP support and adding new features here and there. Esp. completion inside a foreach over a Iterator class works now!
  • and as always ZWabel did fix quite a lot of bugs, most of them which only were discoverable in a few corner cases, very nice indeed.
  • shaforo who sadly already left us again to attend university fixed the sorting in the Project view among other things
  • With Apols help I managed to get started with a documentation plugin which (currently) integrates I plan to make it possible to use the downloadable documentation as well to speed things up. Actually setting up a documentation plugin is very easy! Maybe I’ll take a look at writing a documentation plugin for Zend, Symfony, etc. pp. as well - should be fairly easy. Maybe I can come up with a generic documentation plugin which makes it possible to include any kind of .html documentation with some configurable mapping… lets see! Or maybe I should take a look at writing Kross plugins (Apol could help me here as well) for that purpose.

Except these changes we also discussed how to support dynamically typed languages like PHP, Ruby, Python and JavaScript better. One result of it that we now plan to fully support the dedicated map types of each language, with autocompletion and such. Of course that won’t be possible for 100% of the use-cases, but we hope to support at least the most common ones (i.e. 90%). You can take a look at for more information.

Additionally Nsams, Apol and Zwabel took a look at the GDB plugin and started working on it a bit. It’s still a work in progress though.

My biggest change is that color highlighting support for dark color schemes now is in trunk. It automatically adapts to changes in the global KDE color scheme, yet you still have to manually change the Kate color scheme. Actually I intend to add an interface to Kate so we can use it’s color schemes instead of the global KDE one - makes much more sense and would fix some bugs (i.e. fix from dark color scheme to a light one). Here’s a screenshot of it (with the documentation showing):

highlighting in kdevelop with dark color scheme
dark color scheme and syntax highlighting in KDevelop 4

If you followed the planet kde you might have seen some blog posts about color reception and color generation by Ariya Hidayat. I will take a look at it and implement it in KDevelop. Or I simply pick a given set of colors and use them - for 10 colors or so we need it doesn’t make that much sense to let them be generated. Yet the article he linked to about adaptive coloring for syntax highlighting will be helpful I think! Thanks!

Yet it currently works quite well I’ll first try to fix the colors in the Declaration tooltip, quickopen and codecompletion lists.

So stay tuned for more KDevelop goodness throughout the next days.

» Attack of the shell helpers

Mon, 03/02/2009 - 02:46

Everyone who uses the command line regularly has a bunch of (at least for him) useful helper scripts. I now took the liberty to put mine on github for general consumption.

You can find them at:

Some of these might be more useful than others, you decide :) Personally, I can’t live without the following:

a shortcut to update your Debian system with one command - no questions asked
opens a given URL in an already opened browser instance or starts a new browser session. Not only one browser is checked. I use it because firefox is slow to start and konqueror is blazingly fast to start. But when firefox is already open I want to use that.
shortcut for fast error checking in your Xorg log
makes KDE4 Klipper contents available on the CLI (read and write access!)

shortcut to start a GDB session: debug APP APP_ARGS is all you have to do. Its basically the same as doing:

  1. $ gdb APP
  2. > run APP_ARGS

» Take 2: Download script for Ebooks

Tue, 02/24/2009 - 22:58

NOTE: This script is apparently against the licensing contract between universities and Springer, see:

NOTE 2: I do not maintain this script anymore. Please look for an alternative.

Seems like quite some people are interested in my bash script for downloading ebooks from

That script has some quirks, the greatest of all that it was written in bash which makes it kind of hard to implement new features. And one which was requested was support for books which span multiple pages on SpringerLink.

So here I present - a Python rewrite which should handle all the old links and some more. This is the very first program I’ve written in Python. And since it has to run on the Zedat servers it’s limited to Python 2.4.x without any fancy shmancy additions (a pity, since I’d love to use urlgrabber or pycurl).

the script

You can find the sources on GitHub:

I plan to put all my future code snippets in public repositories on GitHub. That way you can easily track changes and stay up to date. GitHub also has a nice “download” feature which you can use to get the current version. You can find my profile and my repositories at

Note: This script is intended to be run under Linux or other *nix’es which fulfill the requirements (Python 2.4.x, iconv and pdftk). Windows is not supported.

  • introduce multithreading for faster / simultaneous downloads
  • add speed to progressbar
  • use progressbar in source-downloader
  • use one git-repo per project (makes links work properly)