BLOG HAS BEEN MOVED TO HERE!

21 November 2005

Another tiny note - why is it so that all the Python wrappers for Gnome and Freedesktop related things (GnomeVFS and DBus in my experience) have absolutely no API documentation !!! PyGTK has a nice set of documentation for GTK work, but it doesn't extend beyond that, sadly. When I was writing SBackup, I had to resort to using Python build-in function dir() to show me what names the gnomevfs module exported and guestimate my way from there. That was ugly as hell, but worked. Now I am trying to find any information about that "new" DBus thing that everyone was so excited about approximately a year ago - I can only find a few blog posts about rewrites of said API and a few simple programs that do not even work with the rewritten API. I mean - I can understand not having documentation for internal functions of a desktop program, but not having a public API document for a critical library of freedesktop.org desktop infrastructure - that is just plain dumb.

Edit: It seams that there is some kind of dbus tutorial with Python API section. I do not know, why it didn't appear on first 10 pages of Google search for "dbus python" or "dbus python API", but I hope this linking will help that a bit. Also, we will see, how useful it actually is - the rest of the document itself is quite cryptic to me.

Edit2: I am impressed, the Python chapter is definitely written by someone different from those that wrote the rest of the dbus tutorial - this part actually makes sense, is very detailed and hand-holding when it is needed. i got almost all my questions answered. Thanks to whoever wrote that!

3 Comments:

Anonymous Anonymous said...

Python sometime has a very hidden documentation.
I discovered that when desperately looking for documentation for the python libxml2 wrapper:
Just run "pydoc module".
"pydoc dbus" seems to give a very basic documentation for it. No idea if that is sufficent for your needs, though.

21 November, 2005 01:40  
Blogger Aigars Mahinovs said...

Well that is the same you can get with dir() and help() - no information about how to actually piece the whole thing together. Not meny functions and classes have sufficient ___doc___ strings if at all.
Luckily I found that tutorial. :)

21 November, 2005 02:02  
Blogger psi said...

You can also use IPython (which supports tab-completion and listing of members in case of multiple completion).
It also can show documentation of a method by appending '?' character, something like 're.findall?'.
And going on the tangent, please name your links sensibly, google isn't going to get much from link named 'tutorial', but 'dbus python bindings tutorial' would give a lot of googlejuice.

21 November, 2005 03:24  

Post a Comment

<< Home