'Toggle a bookmark at the specified or current position'

def ToggleBookmarkEvent(self, event, pos=(-1)):

    if (pos == (-1)):
        (pos, end) = self.GetSel()
    startLine = self.LineFromChar(pos)
    self.GetDocument().MarkerToggle((startLine + 1), MARKER_BOOKMARK)
    return 0
