While using PyGTK, I want to try and define signal handlers
automagically, without explicitly writing the long dictionary (i.e. I
want to use signal_autoconn ect()).
To do this, I need something that will inspect the current "self" and
return a dictionary that looks like:
{
"method_nam e" : self.method_nam e
}
Class.__dict__ does something very similar, but when I use it, either
I'm doing something wrong or it doesn't return methods bound to "self",
and python complains a wrong number of arguments is being passed to the
methods (one instead of two).
instance.__dict __ on the other hand returns an empty dictionary.
This looks like it should be easy, but I can't find the solution :(
--
(\__/)
(O.o)
(< )
This is Bunny.
Copy Bunny into your signature to help him on his way to world domination!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRlnFldn AQVacBcgRAugIAJ 0aqM6ZNKeUZUFCu r7ODEbGcMFvCgCg xze2
LCUqdGi4nCvZrwn Fru2To6Y=
=+8Zd
-----END PGP SIGNATURE-----
automagically, without explicitly writing the long dictionary (i.e. I
want to use signal_autoconn ect()).
To do this, I need something that will inspect the current "self" and
return a dictionary that looks like:
{
"method_nam e" : self.method_nam e
}
Class.__dict__ does something very similar, but when I use it, either
I'm doing something wrong or it doesn't return methods bound to "self",
and python complains a wrong number of arguments is being passed to the
methods (one instead of two).
instance.__dict __ on the other hand returns an empty dictionary.
This looks like it should be easy, but I can't find the solution :(
--
(\__/)
(O.o)
(< )
This is Bunny.
Copy Bunny into your signature to help him on his way to world domination!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRlnFldn AQVacBcgRAugIAJ 0aqM6ZNKeUZUFCu r7ODEbGcMFvCgCg xze2
LCUqdGi4nCvZrwn Fru2To6Y=
=+8Zd
-----END PGP SIGNATURE-----
Comment