Skip to content

Instantly share code, notes, and snippets.

@pgrandin
Created November 12, 2018 16:31
Show Gist options
  • Save pgrandin/044dd5eb326aff84c79c82bc6a9b048d to your computer and use it in GitHub Desktop.
Save pgrandin/044dd5eb326aff84c79c82bc6a9b048d to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import dbus
import gobject
gobject.threads_init()
from dbus import glib
glib.init_threads()
# Create a session bus.
import dbus
bus = dbus.SessionBus()
# Create an object that will proxy for a particular remote object.
remote_object = bus.get_object("org.navit_project.navit", # Connection name
"/org/navit_project/navit/default_navit" ) # Object's path
# Introspection returns an XML document containing information
# about the methods supported by an interface.
print "Introspection data:"
print remote_object.Introspect()
bookmark = dbus.Interface(remote_object, dbus_interface="org.navit_project.navit.bookmarks")
print "Setting destination"
bookmark.set_as_destination("Park")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment