Como mandar notificaciones a través DBus en python 12

Lo que sigue es la típica entrada para que no se me olvide alguna cosa. En esta caso es un pequeño trozo de código python que permite mostrar una notificación en nuestro escritorio (probado en gnome) haciendo uso del bus para comunicación de apps en escritorio DBus. Bueno, al lío. Creo que el código se explica solo con los prints 🙂

import dbus
print "Inicializando el bus de tipo session"
bus = dbus.SessionBus()
print "Obteniendo el objeto Notifications"
notify_object = bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications')
print "Obteniendo una interface de tipo Notificatios del objecto"
notify_interface = dbus.Interface(notify_object,'org.freedesktop.Notifications')
print "Lanzando la notificacion"
noti_id = notify_interface.Notify("DBus Test", 0, "", "Hola mundo!",'Solo un saludo!', '',{},10000 )
print "Tenemos la notificacion con el ID: ",noti_id

Dejar un Comentario

Tu dirección de correo electrónico no será publicada.

12 Comentarios en “Como mandar notificaciones a través DBus en python

  • longchamp handbags

    I want to convey my affection for your generosity supporting persons who really need help on the field. Your very own commitment to passing the message throughout has been incredibly productive and have all the time enabled most people much like me to arrive at their ambitions. Your personal informative guidelines entails a lot to me and additionally to my colleagues. Regards; from everyone of us.

  • Adidas NMD Runner PK All White

    There are some interesting time limits on this article but I don抰 know if I see all of them heart to heart. There’s some validity however I will take hold opinion till I look into it further. Good article , thanks and we want more! Added to FeedBurner as well

  • skechers go walk

    I have to point out my love for your kindness giving support to all those that should have help on that subject. Your personal commitment to getting the solution all-around had been wonderfully insightful and have all the time permitted others like me to arrive at their targets. Your warm and friendly help denotes much a person like me and even further to my mates. Many thanks; from each one of us.

  • longchamp handbags

    I precisely wished to thank you very much once again. I’m not certain what I would’ve followed without the type of suggestions shared by you about such a industry. It had been a real traumatic setting in my opinion, however , looking at the well-written strategy you resolved the issue took me to weep with joy. I’m just thankful for your work and as well , trust you realize what a great job you happen to be getting into teaching the rest by way of your blog. Probably you’ve never encountered all of us.

  • adidas stan smith

    Thanks so much for giving everyone an exceptionally memorable possiblity to check tips from here. It’s always so great and jam-packed with a great time for me personally and my office fellow workers to search the blog at a minimum three times per week to study the newest secrets you have. Not to mention, I am just usually fulfilled for the dazzling strategies you give. Certain two points on this page are really the most efficient we have had.

  • fitflops

    Thanks a lot for providing individuals with an extremely memorable possiblity to read in detail from this website. It can be very superb and stuffed with a lot of fun for me and my office fellow workers to search your blog nearly three times every week to read through the newest guides you have got. Not to mention, we are actually fulfilled considering the brilliant opinions you serve. Some two points in this posting are really the simplest we have ever had.

  • michael kors outlet online

    I am commenting to let you know of the really good experience my girl enjoyed reading through your site. She came to understand numerous issues, with the inclusion of what it is like to possess a marvelous coaching character to get many others clearly fully grasp some tortuous matters. You actually did more than my expectations. I appreciate you for producing those valuable, healthy, informative and in addition cool guidance on your topic to Sandra.

  • nike air zoom

    I just wanted to write down a small remark in order to say thanks to you for all the fantastic information you are posting at this website. My incredibly long internet look up has now been paid with wonderful points to write about with my best friends. I ‘d repeat that most of us visitors actually are unquestionably fortunate to be in a fabulous network with very many outstanding individuals with insightful basics. I feel really grateful to have encountered your site and look forward to really more enjoyable moments reading here. Thank you once more for a lot of things.

  • longchamp outlet

    I needed to send you one very small remark so as to give thanks once again regarding the incredible views you have documented here. It’s shockingly generous with people like you to deliver without restraint what many individuals would have made available as an e-book to end up making some dough on their own, primarily now that you might have tried it in case you decided. These thoughts as well served to be the easy way to recognize that most people have similar eagerness just as my personal own to realize much more with respect to this problem. I’m certain there are millions of more pleasurable moments in the future for folks who look over your site.

  • timberland boots

    Thanks for each of your work on this website. My mum really likes carrying out research and it is easy to see why. A lot of people hear all concerning the dynamic manner you render very useful solutions by means of your website and in addition attract contribution from some others about this subject while our girl is actually discovering a lot of things. Take advantage of the rest of the year. You’re the one performing a terrific job.

  • michael kors outlet store

    I not to mention my pals have been digesting the best pointers found on your web blog and then instantly came up with an awful suspicion I had not expressed respect to the blog owner for those tips. Most of the people were totally very interested to read through them and have in effect extremely been making the most of these things. We appreciate you really being really accommodating and then for utilizing variety of notable issues most people are really needing to understand about. My very own sincere apologies for not expressing gratitude to earlier.