def execute_proc(procname, args=()):
    """
    Execute a stored procedure. Returns the number of affected rows.
    """
    ctx = Context.current()
    with ctx.mdr:
        cursor = ctx.execute_proc(procname, args)
        row_count = cursor.rowcount
        _safe_close(cursor)
    return row_count
def execute_proc ( procname , args = ( ) ) : ctx = Context . current ( ) with ctx . mdr : cursor = ctx . execute_proc ( procname , args ) row_count = cursor . rowcount _safe_close ( cursor ) return row_count
Execute a stored procedure. Returns the number of affected rows.