Multiple-in-One Objects with Python

Theodore Reed ted.reed at
Sat Sep 24 14:54:57 PDT 2005


I'm developing a replacement for mserv, utilizing python, dbus, gstreamer
and sqlobject. Work is progressing steadily (although slowly... full-time
job and all that), but now I have a question that should be answered before
I move much further with the database stuff.

As it stands, I have a single DBus object which allows for simple
manipulation of the player. I also plan to have another object that allows
queries and manipulation of the database. I had the idea to allow access to
database objects as (for example) /us/surreality/Tunara/Database/SongX,
where X is the id of the song in the database. It would, however, be
considerably wasteful to have a Python object around for each song in the
database, which leads me to ask the following question:

Is it possible, with dbus, to implement one object which acts as multiple
objects, and the exact object is known when the method is called? If not, is
this planned? I can't imagine the Gnumeric guys would want to implement a
separate object for each cell in a spreadsheet either. It seems that it
should be possible, on some level, but it appears that there's no way to do
it with the Python bindings.

Thanks in advance.

-- Ted Reed
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the dbus mailing list