Thread: [Orbit-python-list] bonobo-python, get_object, and wrapping
Status: Inactive
Brought to you by:
tack
From: Thomas M. <ma...@ma...> - 2001-09-21 02:29:55
|
Hi list. I am currently playing around with orbit-python, and decided to have a look at the bonobo bindings, and as a small project to get started I wanted to play a bit with Evolution through the bonobo/corba interface. Now, my approach to this would be writing something like import bonobo shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell", "IDL:GNOME/Evolution/Shell:1.0") and then start accessing the evolution shell through 'shell'. The problem then is, that bonobo.get_object gives me a CORBA.Object, and not an object wrapping with an Evolution/Shell interface. Am I on the right track here? If so, how do I actually access the shell-interface? If not, how can I get access to the evolution shell by other means? I am using orbit-python 0.3 and bonobo-python from CVS, btw. Cheers, /mailund -- Keep Smiling Everyone Loves A Moron |
From: Jason T. <ta...@li...> - 2001-09-21 02:33:21
|
> Now, my approach to this would be writing something like > > import bonobo > shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell", > "IDL:GNOME/Evolution/Shell:1.0") > > and then start accessing the evolution shell through 'shell'. The > problem then is, that bonobo.get_object gives me a CORBA.Object, and not Don't forget to import Bonobo too (note the upper case B). Cheers, Jason. |
From: Thomas M. <ma...@ma...> - 2001-09-21 02:54:41
|
On Fri, 2001-09-21 at 12:01, Jason Tackaberry wrote: > > Now, my approach to this would be writing something like > > > > import bonobo > > shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell", > > "IDL:GNOME/Evolution/Shell:1.0") > > > > and then start accessing the evolution shell through 'shell'. The > > problem then is, that bonobo.get_object gives me a CORBA.Object, and not > > Don't forget to import Bonobo too (note the upper case B). hmm...that, in itself, doesn't quite do it form me. Is there something else I need to import or initialize? The program I'm running right now is this one: #!/usr/bin/env python import bonobo import Bonobo shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell", "IDL:GNOME/Evolution/Shell:1.0") print 'shell', shell, dir(shell.__class__) the output shows that 'shell' is a CORBA.Object, and that none of the evolution/shell methods are available. /mailund -- Eagles may soar, but weasels don't get sucked into jet engines. |
From: Johan D. <zil...@ho...> - 2001-09-21 03:01:37
|
fre 2001-09-21 klockan 04.46 skrev Thomas Mailund: > On Fri, 2001-09-21 at 12:01, Jason Tackaberry wrote: > > > Now, my approach to this would be writing something like > > > > > > import bonobo > > > shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell", > > > "IDL:GNOME/Evolution/Shell:1.0") > > > > > > and then start accessing the evolution shell through 'shell'. The > > > problem then is, that bonobo.get_object gives me a CORBA.Object, and not > > > > Don't forget to import Bonobo too (note the upper case B). > > hmm...that, in itself, doesn't quite do it form me. Is there something > else I need to import or initialize? The program I'm running right now > is this one: > > #!/usr/bin/env python > > import bonobo > import Bonobo import GNOME.Evolution instead of Bonobo. > > shell = bonobo.get_object("OAFIID:GNOME_Evolution_Shell", > "IDL:GNOME/Evolution/Shell:1.0") > print 'shell', shell, dir(shell.__class__) > > > the output shows that 'shell' is a CORBA.Object, and that none of the > evolution/shell methods are available. > > /mailund > -- ------------------------------------------------- - Johan Dahlin Address: - - zi...@as... Nygatan 17, nb - - zil...@ho... 523 30 Ulricehamn - - PHONE: +46 (0)321-17559 SWEDEN - - IRC: zilch @ irc.gnome.org - ------------------------------------------------- |
From: Jason T. <ta...@li...> - 2001-09-21 03:00:48
|
> the output shows that 'shell' is a CORBA.Object, and that none of the > evolution/shell methods are available. Oh, right. Sorry. :) from GNOME import Evolution You're fetching an Evolution CORBA object, of course, so you need to import the IDL for that. That should do it. Otherwise I'll let Johan figure it out. :D Cheers, Jason. |
From: Thomas M. <ma...@ma...> - 2001-09-21 03:31:33
|
On Fri, 2001-09-21 at 12:29, Jason Tackaberry wrote: > > the output shows that 'shell' is a CORBA.Object, and that none of the > > evolution/shell methods are available. > > Oh, right. Sorry. :) > > from GNOME import Evolution > > You're fetching an Evolution CORBA object, of course, so you need to > import the IDL for that. > > That should do it. Otherwise I'll let Johan figure it out. :D That's the magic I needed. Thanks a bunch. /mailund -- I believe in God. I just don't trust his ground personnel. |