<p>I've created a python object, but I want to send signals on it.  I made it inherit from gobject.GObject, but there doesn't seem to be any way to create a new signal on my object.</p>

[{'answer_id': 66883, 'author': 'Sebastian Rittau', 'author_id': 7779, 'author_profile': 'https://Stackoverflow.com/users/7779', 'pm_score': 2, 'selected': False, 'text': '<p>Here is how:</p>\n\n<pre><code>import gobject\n\nclass MyGObjectClass(gobject.GObject):\n    ...\n\ngobject.signal_new("signal-name", MyGObjectClass, gobject.SIGNAL_RUN_FIRST,\n    None, (str, int))\n</code></pre>\n\n<p>Where the second to last argument is the return type and the last argument is a tuple of argument types.</p>\n'}, {'answer_id': 67743, 'author': 'Torsten Marek', 'author_id': 9567, 'author_profile': 'https://Stackoverflow.com/users/9567', 'pm_score': 5, 'selected': True, 'text': '<p>You can also define signals inside the class definition:</p>\n\n<pre><code>class MyGObjectClass(gobject.GObject):\n    __gsignals__ = {\n      "some-signal": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (object, )),\n    }\n</code></pre>\n\n<p>The contents of the tuple are the the same as the three last arguments to <code>gobject.signal_new</code>.</p>\n'}, {'answer_id': 126355, 'author': 'Johan Dahlin', 'author_id': 14337, 'author_profile': 'https://Stackoverflow.com/users/14337', 'pm_score': 2, 'selected': False, 'text': '<p>If you use kiwi available <a href="http://kiwi.async.com.br/" rel="nofollow noreferrer">here</a> you can just do:</p>\n\n<pre><code>from kiwi.utils import gsignal\n\nclass MyObject(gobject.GObject):\n    gsignal(\'signal-name\')\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/66730', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8453/']