:param cursor_factory: Override default Cursor
        :return: psycopg2 cursor

def cursor(self,*args,**kwargs):
        """
        :param cursor_factory: Override default Cursor
        :return: psycopg2 cursor
        """
        d_out("Handle.cursor: Creating cursor..")
        if not self.open:
            raise Exception("Connection isn't open.")

        if 'cursor_factory' not in kwargs or kwargs['cursor_factory'] == None:
            kwargs["cursor_factory"] = Cursor
        callback = kwargs.pop('callback', None)
        cur = self.conn.cursor(*args,**kwargs)
        if callback:
            d_out('Handle.cursor() setting callback attrib {0}'.format(callback))
            cur.callback = callback
        return cur