Saturday, June 18, 2011

Basic List content type support in KDevelop-Python

Hey,

after dealing with a few difficult problems, I finally got a first prototype of the "list content type support" implemented:
Doesn't look very impressive? It isn't, yet. But: The plugin now tracks which kind of data a list contains, and when accessing the list in one or another way, it uses that information to guess the type of the resulting objects. This is not very advanced yet, but it will be easy to extend now once the basics are there (and I think it will become very powerful if I can implement all the stuff I'm planning to). One important part of this feature will also be support for fixed-length lists (tuples), so you get correct types for code like
image_size = 800, 600
x, y = image_size # it should know that x, y are ints

Oh, and one more note: This feature is decorator-based, so all classes with a specific decorator are considered "container" classes. Thus, you can add your own containers by just using the @TypeContainer decorator, and the plugin will track their types.

Apart from adding that feature, I fixed some (more or less severe) bugs since alpha1.1, and the plugin can now parse pypy (one million LoC) without crashing (however it needs quite a few minutes to do so...).

Have Fun, and feel free to email me about problems.
Bye,
Sven

Thursday, June 9, 2011

KDevelop python language support plugin pre-release

Hey there!

For the last couple of months, I have been working on Python language support for KDevelop, the well-known C++ IDE from the KDE project. Now I can finally release a first preview of my work to the public:
In this post I'll tell you about what the plugin is capable of and how to install it.