i tried that, something with __main_ (while ago don't really
recall)... but python didn't like that
Jonathan Matthew wrote:
On Sun, Jan 3, 2010 at 11:09 AM, Ron Croonenberg <r...@depauw.edu> wrote:
Hello,
I am trying to write a plugin for Rhythmbox and want to check if an object I
have is of a certain type
what I want to do is something like:
if type(source) == type(something.RBPlayQueueSource):
if I do a "print type(SOURCE)", print shows me the string
"browse.__main__.RBPlayQueueSource".
I am wondering what class '__main__' is an instance of.
or is there a better way to do this?
Most of the rhythmbox object types aren't really visible from python.
You can check GObject types by name, though: source.__gtype__.name ==
'RBPlayQueueSource', for instance.
Probably not a great example, though, since you can get at the play
queue source directly with shell.props.queue_source.
_______________________________________________
rhythmbox-devel mailing list
rhythmbox-devel@gnome.org
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
--
==================================================================
main(p){printf(p,34,p="main(p){printf(p,34,p=%c%s%c,34); }",34); }
==================================================================
Ron Croonenberg |
| Phone: 1 765 658 4761
Lab Instructor & | Fax: 1 765 658 4732
Technology Coordinator |
|
Department of Computer Science | e-mail: r...@depauw.edu
DePauw University |
275 Julian Science & Math Center |
602 South College Ave. |
Greencastle, IN 46135 |
==================================================================
_______________________________________________
rhythmbox-devel mailing list
rhythmbox-devel@gnome.org
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel