I
Ivan Voras
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_autoconnect()).
To do this, I need something that will inspect the current "self" and
return a dictionary that looks like:
{
"method_name" : self.method_name
}
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
--
(\__/)
()
(> < )
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
iD8DBQFGRlnFldnAQVacBcgRAugIAJ0aqM6ZNKeUZUFCur7ODEbGcMFvCgCgxze2
LCUqdGi4nCvZrwnFru2To6Y=
=+8Zd
-----END PGP SIGNATURE-----
automagically, without explicitly writing the long dictionary (i.e. I
want to use signal_autoconnect()).
To do this, I need something that will inspect the current "self" and
return a dictionary that looks like:
{
"method_name" : self.method_name
}
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
--
(\__/)
()
(> < )
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
iD8DBQFGRlnFldnAQVacBcgRAugIAJ0aqM6ZNKeUZUFCur7ODEbGcMFvCgCgxze2
LCUqdGi4nCvZrwnFru2To6Y=
=+8Zd
-----END PGP SIGNATURE-----