Take the 2-minute tour ×

Is it possible to create a dbus method that accepts multiple arguments?

I wish to make a method like this:

def some_method(self, string, list_of_strings):
    #do something with arguments

into a method accessible using dbus. Is there a way to specify multiple arguments in dbus. My only solution so far is to use one big list as my arguments:

@dbus.service.method('org.my.service', in_signature='as')
def some_method(self, list_of_strings):
    string = list_of_strings.pop(0)

I would prefer to have the arguments separate - how, if at all, can this be done?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I believe in_signature='sas' would achieve what you want.

share|improve this answer

Your Answer


