From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28128 invoked by alias); 25 Oct 2014 09:08:41 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 28116 invoked by uid 89); 25 Oct 2014 09:08:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f172.google.com Received: from mail-wi0-f172.google.com (HELO mail-wi0-f172.google.com) (209.85.212.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 25 Oct 2014 09:08:39 +0000 Received: by mail-wi0-f172.google.com with SMTP id bs8so2847477wib.11 for ; Sat, 25 Oct 2014 02:08:36 -0700 (PDT) X-Received: by 10.180.207.77 with SMTP id lu13mr9585409wic.12.1414228116176; Sat, 25 Oct 2014 02:08:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.163.34 with HTTP; Sat, 25 Oct 2014 02:08:16 -0700 (PDT) From: nojhan Date: Sat, 25 Oct 2014 09:08:00 -0000 Message-ID: Subject: Define python hooks To: gdb Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00096.txt.bz2 Hello, I'm currently using several of hook-* and hookpost-* functions with shell commands. I was wondering if there was a way to define such hooks in pure python. For instance, I would like to import a module at startup and use it across all the hooks to manipulate the output of the hooked commands. -- nojhan