It seems there is a conceptual error between signals and methods.
On one hand, the signals are triggered when an event occurs, those signals can be names as strings like 'insert-at-cursor' or 'insert_at_cursor'. On the other hand, you need to connect those signals (in a widget) with your functions/methods. The functions/methods can have any arbitrary name, for making them easier to read we try to name them as close as the signals, but it is not mandatory.
In your case, you might want to have something like:
class Foo:
...
def create_widgets(self):
entry.gtkEntry()
entry.connect('insert-at-cursor', self.entry_insert_at_cursor)
def entry_insert_at_cursor(self, *args):
# some code
As you can see, in entry.connect(...) happens the match between signal and method.
That explains the syntax error in your code.
The another misconception seems to be the use of the signal insert-at-cursor. For that signal, you have to bind the entry to a key, which does not seem the behaviour you are looking for. Depending of the version of GTK you are targeting, you might want to use:
entry.connect('changed', self.entry_changed)
or
entry.connect('insert-text', self.entry_insert_text)
In the latter, your method will receive the text changed as well as the position. Similarly, you can deal directly with the buffer associated with the entry:
entry.connect('inserted-text', self.buffer_entry_inserted_text)
Where the method will receive additionally the numbers of bytes inserted.