From dbc@rpath.com Fri Nov 11 09:57:08 2005
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEv7kf022349
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:07 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEut4p008452 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:56:55 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEuscq008460
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:56:54 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEus95008459
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:56:54 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111456.jABEus95008459@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:56:54 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: add init file
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:08 -0000

user:        dbc@wallace.rdu.rpath.com
files:       __init__.py

add init file

diff -r eda27f1c800a -r 913b8c5bd41b __init__.py
--- /dev/null	Wed Nov  9 19:04:20 2005
+++ b/__init__.py	Wed Nov  9 19:04:33 2005
@@ -0,0 +1,14 @@
+#
+# Copyright (c) 2004-2005 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/cpl.php.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any waranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+
+from epdb import *

From dbc@rpath.com Fri Nov 11 09:57:11 2005
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvBLZ022357
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:11 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEuw4p008556 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:56:58 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEuvvO008484
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:56:57 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEuv95008483
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:56:57 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111456.jABEuv95008483@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:56:57 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: rename LICENSE.txt to LICENSE
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:11 -0000

user:        dbc@wallace.rdu.rpath.com
files:       LICENSE

rename LICENSE.txt to LICENSE

diff -r 913b8c5bd41b -r ce13c3c4c95d LICENSE
--- /dev/null	Wed Nov  9 19:04:33 2005
+++ b/LICENSE	Wed Nov  9 19:07:39 2005
@@ -0,0 +1,266 @@
+A. HISTORY OF THE SOFTWARE
+==========================
+
+Python was created in the early 1990s by Guido van Rossum at Stichting
+Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
+as a successor of a language called ABC.  Guido remains Python's
+principal author, although it includes many contributions from others.
+
+In 1995, Guido continued his work on Python at the Corporation for
+National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
+in Reston, Virginia where he released several versions of the
+software.
+
+In May 2000, Guido and the Python core development team moved to
+BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
+year, the PythonLabs team moved to Digital Creations (now Zope
+Corporation, see http://www.zope.com).  In 2001, the Python Software
+Foundation (PSF, see http://www.python.org/psf/) was formed, a
+non-profit organization created specifically to own Python-related
+Intellectual Property.  Zope Corporation is a sponsoring member of
+the PSF.
+
+All Python releases are Open Source (see http://www.opensource.org for
+the Open Source Definition).  Historically, most, but not all, Python
+releases have also been GPL-compatible; the table below summarizes
+the various releases.
+
+    Release         Derived     Year        Owner       GPL-
+                    from                                compatible? (1)
+
+    0.9.0 thru 1.2              1991-1995   CWI         yes
+    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
+    1.6             1.5.2       2000        CNRI        no
+    2.0             1.6         2000        BeOpen.com  no
+    1.6.1           1.6         2001        CNRI        yes (2)
+    2.1             2.0+1.6.1   2001        PSF         no
+    2.0.1           2.0+1.6.1   2001        PSF         yes
+    2.1.1           2.1+2.0.1   2001        PSF         yes
+    2.2             2.1.1       2001        PSF         yes
+    2.1.2           2.1.1       2002        PSF         yes
+    2.1.3           2.1.2       2002        PSF         yes
+    2.2.1           2.2         2002        PSF         yes
+    2.2.2           2.2.1       2002        PSF         yes
+    2.2.3           2.2.2       2003        PSF         yes
+    2.3             2.2.2       2002-2003   PSF         yes
+    2.3.1           2.3         2002-2003   PSF         yes
+    2.3.2           2.3.1       2002-2003   PSF         yes
+    2.3.3           2.3.2       2002-2003   PSF         yes
+    2.3.4           2.3.3       2004        PSF         yes
+    2.3.5           2.3.4       2005        PSF         yes
+    2.4             2.3         2004        PSF         yes
+    2.4.1           2.4.1       2005        PSF         yes
+
+Footnotes:
+
+(1) GPL-compatible doesn't mean that we're distributing Python under
+    the GPL.  All Python licenses, unlike the GPL, let you distribute
+    a modified version without making your changes open source.  The
+    GPL-compatible licenses make it possible to combine Python with
+    other software that is released under the GPL; the others don't.
+
+(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
+    because its license has a choice of law clause.  According to
+    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
+    is "not incompatible" with the GPL.
+
+Thanks to the many outside volunteers who have worked under Guido's
+direction to make these releases possible.
+
+
+B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
+===============================================================
+
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+--------------------------------------------
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation
+("PSF"), and the Individual or Organization ("Licensee") accessing and
+otherwise using this software ("Python") in source or binary form and
+its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python
+alone or in any derivative version, provided, however, that PSF's
+License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
+2001, 2002, 2003, 2004 Python Software Foundation; All Rights Reserved"
+are retained in Python alone or in any derivative version prepared
+by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python.
+
+4. PSF is making Python available to Licensee on an "AS IS"
+basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between PSF and
+Licensee.  This License Agreement does not grant permission to use PSF
+trademarks or trade name in a trademark sense to endorse or promote
+products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
+-------------------------------------------
+
+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+
+1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
+office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
+Individual or Organization ("Licensee") accessing and otherwise using
+this software in source or binary form and its associated
+documentation ("the Software").
+
+2. Subject to the terms and conditions of this BeOpen Python License
+Agreement, BeOpen hereby grants Licensee a non-exclusive,
+royalty-free, world-wide license to reproduce, analyze, test, perform
+and/or display publicly, prepare derivative works, distribute, and
+otherwise use the Software alone or in any derivative version,
+provided, however, that the BeOpen Python License is retained in the
+Software, alone or in any derivative version prepared by Licensee.
+
+3. BeOpen is making the Software available to Licensee on an "AS IS"
+basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
+SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
+DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+5. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+6. This License Agreement shall be governed by and interpreted in all
+respects by the law of the State of California, excluding conflict of
+law provisions.  Nothing in this License Agreement shall be deemed to
+create any relationship of agency, partnership, or joint venture
+between BeOpen and Licensee.  This License Agreement does not grant
+permission to use BeOpen trademarks or trade names in a trademark
+sense to endorse or promote products or services of Licensee, or any
+third party.  As an exception, the "BeOpen Python" logos available at
+http://www.pythonlabs.com/logos.html may be used according to the
+permissions granted on that web page.
+
+7. By copying, installing or otherwise using the software, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
+---------------------------------------
+
+1. This LICENSE AGREEMENT is between the Corporation for National
+Research Initiatives, having an office at 1895 Preston White Drive,
+Reston, VA 20191 ("CNRI"), and the Individual or Organization
+("Licensee") accessing and otherwise using Python 1.6.1 software in
+source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, CNRI
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python 1.6.1
+alone or in any derivative version, provided, however, that CNRI's
+License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
+1995-2001 Corporation for National Research Initiatives; All Rights
+Reserved" are retained in Python 1.6.1 alone or in any derivative
+version prepared by Licensee.  Alternately, in lieu of CNRI's License
+Agreement, Licensee may substitute the following text (omitting the
+quotes): "Python 1.6.1 is made available subject to the terms and
+conditions in CNRI's License Agreement.  This Agreement together with
+Python 1.6.1 may be located on the Internet using the following
+unique, persistent identifier (known as a handle): 1895.22/1013.  This
+Agreement may also be obtained from a proxy server on the Internet
+using the following URL: http://hdl.handle.net/1895.22/1013".
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python 1.6.1 or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python 1.6.1.
+
+4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
+basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. This License Agreement shall be governed by the federal
+intellectual property law of the United States, including without
+limitation the federal copyright law, and, to the extent such
+U.S. federal law does not apply, by the law of the Commonwealth of
+Virginia, excluding Virginia's conflict of law provisions.
+Notwithstanding the foregoing, with regard to derivative works based
+on Python 1.6.1 that incorporate non-separable material that was
+previously distributed under the GNU General Public License (GPL), the
+law of the Commonwealth of Virginia shall govern this License
+Agreement only as to issues arising under or with respect to
+Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
+License Agreement shall be deemed to create any relationship of
+agency, partnership, or joint venture between CNRI and Licensee.  This
+License Agreement does not grant permission to use CNRI trademarks or
+trade name in a trademark sense to endorse or promote products or
+services of Licensee, or any third party.
+
+8. By clicking on the "ACCEPT" button where indicated, or by copying,
+installing or otherwise using Python 1.6.1, Licensee agrees to be
+bound by the terms and conditions of this License Agreement.
+
+        ACCEPT
+
+
+CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
+--------------------------------------------------
+
+Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
+The Netherlands.  All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

From dbc@rpath.com Fri Nov 11 09:57:15 2005
Received: from ms-smtp-01-eri0.southeast.rr.com
	(ms-smtp-01-lbl.southeast.rr.com [24.25.9.100])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvF2x022368
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:15 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEv1We002610 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:02 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEv1Qj008516
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:01 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEv1Ob008515
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:01 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEv1Ob008515@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:01 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: switch version to 0.8
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:15 -0000

user:        dbc@wallace.rdu.rpath.com
files:       Makefile NEWS

switch version to 0.8

diff -r ce13c3c4c95d -r cc4327ff3f18 Makefile
--- a/Makefile	Wed Nov  9 19:07:39 2005
+++ b/Makefile	Wed Nov  9 19:08:38 2005
@@ -1,4 +1,4 @@
-export VERSION = 0.70.5
+export VERSION = 0.8
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
diff -r ce13c3c4c95d -r cc4327ff3f18 NEWS
--- a/NEWS	Wed Nov  9 19:07:39 2005
+++ b/NEWS	Wed Nov  9 19:08:38 2005
@@ -1,2 +1,2 @@
-0.1:
+0.8:
     * Initial epdb release

From dbc@rpath.com Fri Nov 11 09:57:18 2005
Received: from ms-smtp-03-eri0.southeast.rr.com
	(ms-smtp-03-lbl.southeast.rr.com [24.25.9.102])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvIL6022385
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:18 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEv5fU027556 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:06 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEv4H9008553
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:04 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEv44g008549
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:04 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEv44g008549@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:04 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: remove old unneeded conary Makefile stuff
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:19 -0000

user:        dbc@wallace.rdu.rpath.com
files:       Makefile

remove old unneeded conary Makefile stuff

diff -r cc4327ff3f18 -r 45d0e1adbdf1 Makefile
--- a/Makefile	Wed Nov  9 19:08:38 2005
+++ b/Makefile	Wed Nov  9 19:10:38 2005
@@ -31,11 +31,6 @@
 		cp -a $$f $(DISTDIR)/$$f; \
 	done; \
 	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
-	@echo "=== sanity building/testing conary ==="; \
-	cd $(DISTDIR); \
-	make > /dev/null; \
-	./conary --version > /dev/null || echo "CONARY DOES NOT WORK"; \
-	cd -; \
 	rm -rf $(DISTDIR)
 
 tag:

From dbc@rpath.com Fri Nov 11 09:57:23 2005
Received: from ms-smtp-03-eri0.southeast.rr.com
	(ms-smtp-03-lbl.southeast.rr.com [24.25.9.102])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvNUY022393
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:23 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEv8fU027678 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:09 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEv7ft008589
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:08 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEv7YG008586
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:07 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEv7YG008586@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:07 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: make NEWS entry conform to Makefile's expectations
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:23 -0000

user:        dbc@wallace.rdu.rpath.com
files:       NEWS

make NEWS entry conform to Makefile's expectations

diff -r 45d0e1adbdf1 -r 335496a44546 NEWS
--- a/NEWS	Wed Nov  9 19:10:38 2005
+++ b/NEWS	Wed Nov  9 19:11:03 2005
@@ -1,2 +1,2 @@
-0.8:
-    * Initial epdb release
+Changes in 0.8:
+    * Initial seperate epdb release

From dbc@rpath.com Fri Nov 11 09:57:25 2005
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvOnk022401
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:24 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEvB4p009065 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:12 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvBdc008636
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:11 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEvBIc008632
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:11 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEvBIc008632@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:11 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: Added tag epdb-0.8 for changeset
	335496a445463456a39098764c45973149e08a7c
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:25 -0000

user:        dbc@wallace.rdu.rpath.com
files:       .hgtags

Added tag epdb-0.8 for changeset 335496a445463456a39098764c45973149e08a7c

diff -r 335496a44546 -r 9e39e7854f7b .hgtags
--- /dev/null	Wed Nov  9 19:11:03 2005
+++ b/.hgtags	Wed Nov  9 19:13:36 2005
@@ -0,0 +1,1 @@
+335496a445463456a39098764c45973149e08a7c epdb-0.8

From dbc@rpath.com Fri Nov 11 09:57:28 2005
Received: from ms-smtp-03-eri0.southeast.rr.com
	(ms-smtp-03-lbl.southeast.rr.com [24.25.9.102])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvSaE022409
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:28 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEvFfU027858 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:16 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvEPh008673
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:14 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEvEQH008671
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:14 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEvEQH008671@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:14 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: distribute under the MIT License
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:28 -0000

user:        David Christian <http://bugs.rpath.com>
files:       LICENSE Make.rules __init__.py epdb.py stackutil.py

distribute under the MIT License

diff -r 9e39e7854f7b -r f58db318eb99 Make.rules
--- a/Make.rules	Wed Nov  9 19:13:36 2005
+++ b/Make.rules	Thu Nov 10 20:39:13 2005
@@ -2,16 +2,15 @@
 #
 # Copyright (c) 2004-2005 rPath, Inc.
 #
-# This program is distributed under the terms of the Common Public License,
-# version 1.0. A copy of this license should have been distributed with this
-# source file in a file called LICENSE. If it is not present, the license
-# is always available at http://www.opensource.org/licenses/cpl.php.
+# This program is distributed under the terms of the MIT License as found 
+# in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/mit-license.php.
 #
 # This program is distributed in the hope that it will be useful, but
 # without any waranty; without even the implied warranty of merchantability
-# or fitness for a particular purpose. See the Common Public License for
-# full details.
-#
+# or fitness for a particular purpose. See the MIT License for full details.
+
+
 
 PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4 || echo /usr/lib/conary/python/bin/python2.4)
 PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
diff -r 9e39e7854f7b -r f58db318eb99 __init__.py
--- a/__init__.py	Wed Nov  9 19:13:36 2005
+++ b/__init__.py	Thu Nov 10 20:39:13 2005
@@ -1,14 +1,13 @@
 #
 # Copyright (c) 2004-2005 rPath, Inc.
 #
-# This program is distributed under the terms of the Common Public License,
-# version 1.0. A copy of this license should have been distributed with this
-# source file in a file called LICENSE. If it is not present, the license
-# is always available at http://www.opensource.org/licenses/cpl.php.
+# This program is distributed under the terms of the MIT License as found 
+# in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/mit-license.php.
 #
 # This program is distributed in the hope that it will be useful, but
 # without any waranty; without even the implied warranty of merchantability
-# or fitness for a particular purpose. See the Common Public License for
-# full details.
+# or fitness for a particular purpose. See the MIT License for full details.
+
 
 from epdb import *
diff -r 9e39e7854f7b -r f58db318eb99 epdb.py
--- a/epdb.py	Wed Nov  9 19:13:36 2005
+++ b/epdb.py	Thu Nov 10 20:39:13 2005
@@ -1,16 +1,13 @@
 #
 # Copyright (c) 2004-2005 rPath, Inc.
 #
-# This program is distributed under the terms of the Common Public License,
-# version 1.0. A copy of this license should have been distributed with this
-# source file in a file called LICENSE. If it is not present, the license
-# is always available at http://www.opensource.org/licenses/cpl.php.
+# This program is distributed under the terms of the MIT License as found 
+# in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/mit-license.php.
 #
 # This program is distributed in the hope that it will be useful, but
 # without any waranty; without even the implied warranty of merchantability
-# or fitness for a particular purpose. See the Common Public License for
-# full details.
-#
+# or fitness for a particular purpose. See the MIT License for full details.
 
 
 """ Extended pdb """
diff -r 9e39e7854f7b -r f58db318eb99 stackutil.py
--- a/stackutil.py	Wed Nov  9 19:13:36 2005
+++ b/stackutil.py	Thu Nov 10 20:39:13 2005
@@ -1,16 +1,13 @@
 #
-# Copyright (c) 2004 rPath, Inc.
+# Copyright (c) 2004-2005 rPath, Inc.
 #
-# This program is distributed under the terms of the Common Public License,
-# version 1.0. A copy of this license should have been distributed with this
-# source file in a file called LICENSE. If it is not present, the license
-# is always available at http://www.opensource.org/licenses/cpl.php.
+# This program is distributed under the terms of the MIT License as found 
+# in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/mit-license.php.
 #
 # This program is distributed in the hope that it will be useful, but
 # without any waranty; without even the implied warranty of merchantability
-# or fitness for a particular purpose. See the Common Public License for
-# full details.
-#
+# or fitness for a particular purpose. See the MIT License for full details.
 
 """ Tools for printing out extended information about frame variables """
 

From dbc@rpath.com Fri Nov 11 09:57:32 2005
Received: from ms-smtp-04-eri0.southeast.rr.com
	(ms-smtp-04-lbl.southeast.rr.com [24.25.9.103])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvWiQ022417
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:32 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEvI1u009850 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:19 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvHYv008714
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:18 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEvHPw008712
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:17 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEvHPw008712@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:17 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: Move epdb code into subdir, fix up makefiles
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:32 -0000

tag:         epdb-0.8
user:        David Christian <http://bugs.rpath.com>
files:       Make.rules Makefile epdb/Makefile epdb/__init__.py epdb/epdb.py epdb/stackutil.py

Move epdb code into subdir, fix up makefiles

diff -r f58db318eb99 -r e57708f1b52d Make.rules
--- a/Make.rules	Thu Nov 10 20:39:13 2005
+++ b/Make.rules	Thu Nov 10 21:09:57 2005
@@ -12,12 +12,12 @@
 
 
 
-PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4 || echo /usr/lib/conary/python/bin/python2.4)
+PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4 || exit 1)
 PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
 PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')
 
 pyfiles-install:
-	mkdir -p $(DESTDIR)$(conarydir)
+	mkdir -p $(DESTDIR)$(epdbdir)
 	for f in $(python_files); do \
 		mkdir -p `dirname $(DESTDIR)/$(sitedir)/$(DIR)/$$f`; \
 		cp -a $$f $(DESTDIR)/$(sitedir)/$(DIR)/$$f; \
diff -r f58db318eb99 -r e57708f1b52d Makefile
--- a/Makefile	Thu Nov 10 20:39:13 2005
+++ b/Makefile	Thu Nov 10 21:09:57 2005
@@ -2,7 +2,7 @@
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
-export epdb = $(sitedir)/epdb
+export epdbdir = $(sitedir)/epdb
 
 extra_files =  \
     LICENSE    \
@@ -10,15 +10,19 @@
     Makefile   \
     NEWS
 
-python_files = __init__.py	\
-               epdb.py          \
-               stackutil.py     
+dist_files = $(extra_files)
 
-dist_files = $(extra_files)
+SUBDIRS=epdb
 
 .PHONY: clean dist install subdirs
 
-dist: $(dist_files)
+all: subdirs
+
+subdirs: default-subdirs
+
+install: all install-subdirs pyfiles-install
+
+dist: $(dist_files) 
 	if ! grep "^Changes in $(VERSION)" NEWS > /dev/null 2>&1; then \
 		echo "no NEWS entry"; \
 		exit 1; \

From dbc@rpath.com Fri Nov 11 09:57:38 2005
Received: from ms-smtp-01-eri0.southeast.rr.com
	(ms-smtp-01-lbl.southeast.rr.com [24.25.9.100])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvcpX022425
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:38 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEvMWe003362 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:26 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvL3q008750
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:21 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEvLP6008749
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:57:21 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111457.jABEvLP6008749@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:57:21 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: Added tag epdb-0.8 for changeset
	e57708f1b52d4c1b152f47027985d6b3c0da81a5
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:38 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       .hgtags

Added tag epdb-0.8 for changeset e57708f1b52d4c1b152f47027985d6b3c0da81a5

diff -r e57708f1b52d -r f2a95bc60d92 .hgtags
--- a/.hgtags	Thu Nov 10 21:09:57 2005
+++ b/.hgtags	Thu Nov 10 21:10:06 2005
@@ -1,1 +1,2 @@
 335496a445463456a39098764c45973149e08a7c epdb-0.8
+e57708f1b52d4c1b152f47027985d6b3c0da81a5 epdb-0.8

From dbc@rpath.com Fri Nov 11 09:57:14 2005
Received: from ms-smtp-04-eri0.southeast.rr.com
	(ms-smtp-04-lbl.southeast.rr.com [24.25.9.103])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABEvEtC022365
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:57:14 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABEv01u009318 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 09:57:01 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABEupld008433
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 09:56:51 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABEuojs008432
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 09:56:50 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111456.jABEuojs008432@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 09:56:50 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: initial epdb commit
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-Mailman-Approved-At: Fri, 11 Nov 2005 09:58:14 -0500
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 14:57:14 -0000

user:        dbc@wallace.rdu.rpath.com
files:       LICENSE.txt Make.rules Makefile NEWS epdb.py stackutil.py

initial epdb commit

diff -r 000000000000 -r eda27f1c800a LICENSE.txt
--- /dev/null	Thu Jan  1 00:00:00 1970
+++ b/LICENSE.txt	Wed Nov  9 19:04:20 2005
@@ -0,0 +1,266 @@
+A. HISTORY OF THE SOFTWARE
+==========================
+
+Python was created in the early 1990s by Guido van Rossum at Stichting
+Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
+as a successor of a language called ABC.  Guido remains Python's
+principal author, although it includes many contributions from others.
+
+In 1995, Guido continued his work on Python at the Corporation for
+National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
+in Reston, Virginia where he released several versions of the
+software.
+
+In May 2000, Guido and the Python core development team moved to
+BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
+year, the PythonLabs team moved to Digital Creations (now Zope
+Corporation, see http://www.zope.com).  In 2001, the Python Software
+Foundation (PSF, see http://www.python.org/psf/) was formed, a
+non-profit organization created specifically to own Python-related
+Intellectual Property.  Zope Corporation is a sponsoring member of
+the PSF.
+
+All Python releases are Open Source (see http://www.opensource.org for
+the Open Source Definition).  Historically, most, but not all, Python
+releases have also been GPL-compatible; the table below summarizes
+the various releases.
+
+    Release         Derived     Year        Owner       GPL-
+                    from                                compatible? (1)
+
+    0.9.0 thru 1.2              1991-1995   CWI         yes
+    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
+    1.6             1.5.2       2000        CNRI        no
+    2.0             1.6         2000        BeOpen.com  no
+    1.6.1           1.6         2001        CNRI        yes (2)
+    2.1             2.0+1.6.1   2001        PSF         no
+    2.0.1           2.0+1.6.1   2001        PSF         yes
+    2.1.1           2.1+2.0.1   2001        PSF         yes
+    2.2             2.1.1       2001        PSF         yes
+    2.1.2           2.1.1       2002        PSF         yes
+    2.1.3           2.1.2       2002        PSF         yes
+    2.2.1           2.2         2002        PSF         yes
+    2.2.2           2.2.1       2002        PSF         yes
+    2.2.3           2.2.2       2003        PSF         yes
+    2.3             2.2.2       2002-2003   PSF         yes
+    2.3.1           2.3         2002-2003   PSF         yes
+    2.3.2           2.3.1       2002-2003   PSF         yes
+    2.3.3           2.3.2       2002-2003   PSF         yes
+    2.3.4           2.3.3       2004        PSF         yes
+    2.3.5           2.3.4       2005        PSF         yes
+    2.4             2.3         2004        PSF         yes
+    2.4.1           2.4.1       2005        PSF         yes
+
+Footnotes:
+
+(1) GPL-compatible doesn't mean that we're distributing Python under
+    the GPL.  All Python licenses, unlike the GPL, let you distribute
+    a modified version without making your changes open source.  The
+    GPL-compatible licenses make it possible to combine Python with
+    other software that is released under the GPL; the others don't.
+
+(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
+    because its license has a choice of law clause.  According to
+    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
+    is "not incompatible" with the GPL.
+
+Thanks to the many outside volunteers who have worked under Guido's
+direction to make these releases possible.
+
+
+B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
+===============================================================
+
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+--------------------------------------------
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation
+("PSF"), and the Individual or Organization ("Licensee") accessing and
+otherwise using this software ("Python") in source or binary form and
+its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python
+alone or in any derivative version, provided, however, that PSF's
+License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
+2001, 2002, 2003, 2004 Python Software Foundation; All Rights Reserved"
+are retained in Python alone or in any derivative version prepared
+by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python.
+
+4. PSF is making Python available to Licensee on an "AS IS"
+basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between PSF and
+Licensee.  This License Agreement does not grant permission to use PSF
+trademarks or trade name in a trademark sense to endorse or promote
+products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
+-------------------------------------------
+
+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+
+1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
+office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
+Individual or Organization ("Licensee") accessing and otherwise using
+this software in source or binary form and its associated
+documentation ("the Software").
+
+2. Subject to the terms and conditions of this BeOpen Python License
+Agreement, BeOpen hereby grants Licensee a non-exclusive,
+royalty-free, world-wide license to reproduce, analyze, test, perform
+and/or display publicly, prepare derivative works, distribute, and
+otherwise use the Software alone or in any derivative version,
+provided, however, that the BeOpen Python License is retained in the
+Software, alone or in any derivative version prepared by Licensee.
+
+3. BeOpen is making the Software available to Licensee on an "AS IS"
+basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
+SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
+DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+5. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+6. This License Agreement shall be governed by and interpreted in all
+respects by the law of the State of California, excluding conflict of
+law provisions.  Nothing in this License Agreement shall be deemed to
+create any relationship of agency, partnership, or joint venture
+between BeOpen and Licensee.  This License Agreement does not grant
+permission to use BeOpen trademarks or trade names in a trademark
+sense to endorse or promote products or services of Licensee, or any
+third party.  As an exception, the "BeOpen Python" logos available at
+http://www.pythonlabs.com/logos.html may be used according to the
+permissions granted on that web page.
+
+7. By copying, installing or otherwise using the software, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
+---------------------------------------
+
+1. This LICENSE AGREEMENT is between the Corporation for National
+Research Initiatives, having an office at 1895 Preston White Drive,
+Reston, VA 20191 ("CNRI"), and the Individual or Organization
+("Licensee") accessing and otherwise using Python 1.6.1 software in
+source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, CNRI
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python 1.6.1
+alone or in any derivative version, provided, however, that CNRI's
+License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
+1995-2001 Corporation for National Research Initiatives; All Rights
+Reserved" are retained in Python 1.6.1 alone or in any derivative
+version prepared by Licensee.  Alternately, in lieu of CNRI's License
+Agreement, Licensee may substitute the following text (omitting the
+quotes): "Python 1.6.1 is made available subject to the terms and
+conditions in CNRI's License Agreement.  This Agreement together with
+Python 1.6.1 may be located on the Internet using the following
+unique, persistent identifier (known as a handle): 1895.22/1013.  This
+Agreement may also be obtained from a proxy server on the Internet
+using the following URL: http://hdl.handle.net/1895.22/1013".
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python 1.6.1 or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python 1.6.1.
+
+4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
+basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. This License Agreement shall be governed by the federal
+intellectual property law of the United States, including without
+limitation the federal copyright law, and, to the extent such
+U.S. federal law does not apply, by the law of the Commonwealth of
+Virginia, excluding Virginia's conflict of law provisions.
+Notwithstanding the foregoing, with regard to derivative works based
+on Python 1.6.1 that incorporate non-separable material that was
+previously distributed under the GNU General Public License (GPL), the
+law of the Commonwealth of Virginia shall govern this License
+Agreement only as to issues arising under or with respect to
+Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
+License Agreement shall be deemed to create any relationship of
+agency, partnership, or joint venture between CNRI and Licensee.  This
+License Agreement does not grant permission to use CNRI trademarks or
+trade name in a trademark sense to endorse or promote products or
+services of Licensee, or any third party.
+
+8. By clicking on the "ACCEPT" button where indicated, or by copying,
+installing or otherwise using Python 1.6.1, Licensee agrees to be
+bound by the terms and conditions of this License Agreement.
+
+        ACCEPT
+
+
+CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
+--------------------------------------------------
+
+Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
+The Netherlands.  All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff -r 000000000000 -r eda27f1c800a Make.rules
--- /dev/null	Thu Jan  1 00:00:00 1970
+++ b/Make.rules	Wed Nov  9 19:04:20 2005
@@ -0,0 +1,61 @@
+# -*- makefile -*-
+#
+# Copyright (c) 2004-2005 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/cpl.php.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any waranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4 || echo /usr/lib/conary/python/bin/python2.4)
+PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
+PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')
+
+pyfiles-install:
+	mkdir -p $(DESTDIR)$(conarydir)
+	for f in $(python_files); do \
+		mkdir -p `dirname $(DESTDIR)/$(sitedir)/$(DIR)/$$f`; \
+		cp -a $$f $(DESTDIR)/$(sitedir)/$(DIR)/$$f; \
+	done
+
+default-dist: dist-subdirs
+	for f in $(dist_files); do \
+		mkdir -p $(DISTDIR)/$(DIR)/`dirname $$f`; \
+		cp -a $$f $(DISTDIR)/$(DIR)/$$f; \
+	done
+
+default-install:
+	echo "nothing to install"
+
+default-all:
+	echo "nothing to build"
+
+default-clean: clean-subdirs
+	rm -f *~ .??*~ .#* *.pyo *.pyc $(generated_files)
+
+default-test:
+	$(TESTSUITE) *.py
+
+default-subdirs:
+	for d in $(SUBDIRS); do make -C $$d DIR=$$d || exit 1; done
+
+clean-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d clean || exit 1; done
+endif
+
+install-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d install || exit 1; done
+endif
+
+dist-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d dist || exit 1; done
+endif
diff -r 000000000000 -r eda27f1c800a Makefile
--- /dev/null	Thu Jan  1 00:00:00 1970
+++ b/Makefile	Wed Nov  9 19:04:20 2005
@@ -0,0 +1,46 @@
+export VERSION = 0.70.5
+export TOPDIR = $(shell pwd)
+export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
+export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
+export epdb = $(sitedir)/epdb
+
+extra_files =  \
+    LICENSE    \
+    Make.rules \
+    Makefile   \
+    NEWS
+
+python_files = __init__.py	\
+               epdb.py          \
+               stackutil.py     
+
+dist_files = $(extra_files)
+
+.PHONY: clean dist install subdirs
+
+dist: $(dist_files)
+	if ! grep "^Changes in $(VERSION)" NEWS > /dev/null 2>&1; then \
+		echo "no NEWS entry"; \
+		exit 1; \
+	fi
+	rm -rf $(DISTDIR)
+	mkdir $(DISTDIR)
+	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
+	for f in $(dist_files); do \
+		mkdir -p $(DISTDIR)/`dirname $$f`; \
+		cp -a $$f $(DISTDIR)/$$f; \
+	done; \
+	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+	@echo "=== sanity building/testing conary ==="; \
+	cd $(DISTDIR); \
+	make > /dev/null; \
+	./conary --version > /dev/null || echo "CONARY DOES NOT WORK"; \
+	cd -; \
+	rm -rf $(DISTDIR)
+
+tag:
+	hg tag epdb-$(VERSION)
+
+clean: default-clean
+
+include Make.rules
diff -r 000000000000 -r eda27f1c800a NEWS
--- /dev/null	Thu Jan  1 00:00:00 1970
+++ b/NEWS	Wed Nov  9 19:04:20 2005
@@ -0,0 +1,2 @@
+0.1:
+    * Initial epdb release
diff -r 000000000000 -r eda27f1c800a epdb.py
--- /dev/null	Thu Jan  1 00:00:00 1970
+++ b/epdb.py	Wed Nov  9 19:04:20 2005
@@ -0,0 +1,878 @@
+#
+# Copyright (c) 2004-2005 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/cpl.php.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any waranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+
+""" Extended pdb """
+import stackutil
+import inspect
+import pdb
+import os
+import re
+try:
+    import erlcompleter
+    import readline
+except ImportError:
+    hasReadline = False
+else:
+    hasReadline = True
+import socket
+import string
+import sys
+import tempfile
+import traceback
+
+from pdb import _saferepr
+
+class Epdb(pdb.Pdb):
+    # epdb will print to here instead of to sys.stdout,
+    # and restore stdout when done
+    __old_stdout = None
+    _displayList = {}
+    # used to track the number of times a set_trace has been seen
+    trace_counts = {'default' : [ True, 0 ]}
+
+    def __init__(self):
+        self._exc_type = None
+        self._exc_msg = None
+        self._tb = None
+        self._config = {}
+        pdb.Pdb.__init__(self)
+        if hasReadline:
+            self._completer = erlcompleter.ECompleter()
+        self.prompt = '(Epdb) '
+    
+    def do_savestack(self, path):
+        
+        if 'stack' in self.__dict__:
+            # when we're saving we always 
+            # start from the top
+            frame = self.stack[-1][0]
+        else:
+            frame = sys._getframe(1)
+            while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
+                frame = frame.f_back
+        if path == "":
+            (tbfd,path) = tempfile.mkstemp('', 'conary-stack-')
+            output = os.fdopen(tbfd, 'w')
+        else:
+            output = open(path, 'w')
+        stackutil.printStack(frame, output)
+        print "Stack saved to %s" % path
+
+    def do_mailstack(self, arg):
+        tolist = arg.split()
+        subject = '[Conary Stacktrace]'
+        if 'stack' in self.__dict__:
+            # when we're saving we always 
+            # start from the top
+            frame = self.stack[-1][0]
+        else:
+            frame = sys._getframe(1)
+            while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
+                frame = frame.f_back
+        sender = os.environ['USER']
+        host = socket.getfqdn()
+        extracontent = None
+        if self._tb:
+            lines = traceback.format_exception(self._exc_type, self._exc_msg, 
+                                               self._tb)
+            extracontent = string.joinfields(lines, "")
+        stackutil.mailStack(frame, tolist, sender + '@' + host, subject,
+                            extracontent)
+        print "Mailed stack to %s" % tolist
+
+
+    def do_printstack(self, arg):
+        if 'stack' in self.__dict__:
+            # print only the stack up to our current depth
+            frame = self.stack[-1][0]
+        else:
+            frame = sys._getframe(1)
+            while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
+                frame = frame.f_back
+        stackutil.printStack(frame, sys.stderr)
+
+    
+
+    def do_printframe(self, arg):
+        if not arg:
+            if 'stack' in self.__dict__:
+                depth = self.curindex
+            else:
+                depth = 0
+        else:
+            depth = int(arg)
+            if 'stack' in self.__dict__:
+                # start at -1 (top) and go down...
+                depth = 0 - (depth + 1)
+        if 'stack' in self.__dict__:
+            print "Depth = %d" % depth
+            frame = self.stack[depth][0]
+        else:
+            frame = sys._getframe(1)
+            while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
+                frame = frame.f_back
+            for i in xrange(0, depth):
+                frame = frame.f_back
+        stackutil.printFrame(frame, sys.stderr)
+
+    def do_file(self, arg):
+        frame, lineno = self.stack[self.curindex]
+        filename = self.canonic(frame.f_code.co_filename)
+        print "%s:%s" % (filename, lineno) 
+    do_f = do_file
+
+    def do_until(self, arg):
+        try:
+            int(arg)
+        except ValueError:
+            print "Error: only specify line numbers for until"
+            return 0
+        filename = self.canonic(self.curframe.f_code.co_filename)
+        if self.checkline(filename, int(arg)):
+            self.do_tbreak(arg)
+            self.set_continue()
+            return 1
+        else:
+            return 0
+
+    def do_set(self, arg):
+        if not arg:
+            keys = self._config.keys()
+            keys.sort()
+            for key in keys:
+                print "%s: %s" % (key, self._config[key])
+        else:
+            args = arg.split(None, 1)
+            if len(args) == 1:
+                key = args[0]
+                if key in self._config:
+                    print "Removing %s: %s" % (key, self._config[key])
+                    del self._config[key]
+                else:
+                    print "%s: Not set" % (key)
+            else:
+                key, value = args
+                if(hasattr(self, '_set_' + key)):
+                    fn = getattr(self, '_set_' + key)
+                    fn(value)
+                else:
+                    print "No such config value"
+
+    def do_trace_cond(self, args):
+        args = args.split(' ', 1)
+        if len(args) not in (1, 2):
+            print "trace_cond [marker] <cond>"
+        if len(args) == 1:
+            cond = args[0]
+            marker = 'default'
+        else:
+            marker, cond = args
+        if cond == 'None': 
+            cond = None
+            self.set_trace_cond(marker, cond)
+            return
+        try:
+            cond = int(cond)
+            self.set_trace_cond(marker, cond)
+            return
+        except ValueError:
+            locals = self.curframe.f_locals
+            globals = self.curframe.f_globals
+            try:
+                cond = eval(cond + '\n', globals, locals) 
+                # test to be sure that what we code is a 
+                # function that can take one arg and return a bool
+                rv = (type(cond) == bool) or bool(cond(1))
+                self.set_trace_cond(marker, cond)
+            except:
+                print self._reprExc()
+    do_tc = do_trace_cond
+
+    def _set_path(self, paths):
+        paths = paths.split(' ')
+        for path in paths:
+            if path[0] != '/':
+                print "must give absolute path"
+            if not os.path.exists(path):
+                print "Path %s does not exist" % path
+            if path[-1] == '/':
+                path = path[:-1]
+            path = os.path.realpath(path)
+            if 'path' not in self._config:
+                self._config['path'] = []
+            self._config['path'].append(path)
+        print "Set path to %s" % self._config['path']
+
+    def do_list(self, arg):
+        rel = re.compile(r'^[-+] *[0-9]* *$')
+        if arg and arg == '.':
+            self.lineno = None
+            pdb.Pdb.do_list(self, '')
+            return
+        if rel.match(arg):
+            if arg == '-':
+                reldist = -7
+            else:
+                reldist = int(arg)
+            if self.lineno is None:
+                lineno = self.curframe.f_lineno
+            else:
+                lineno = self.lineno
+            lineno += reldist - 5
+            pdb.Pdb.do_list(self, str(lineno))
+            self.lastcmd = 'list ' + arg
+        else:
+            pdb.Pdb.do_list(self, arg)
+
+    do_l = do_list
+
+    def default(self, line):
+        if line[0] == '!': line = line[1:]
+        if self.handle_directive(line):
+            return
+        if line == '<<EOF':
+            return self.multiline()
+        if line.strip().endswith(':'):
+            return self.multiline(line)
+        if line.endswith('\\'):
+            return self.multiline(line)
+        origLine = line
+        line = _removeQuotes(line)
+        if line is None:
+            return self.multiline(origLine)
+        if line.count('(') > line.count(')'):
+            return self.multiline(origLine)
+        return pdb.Pdb.default(self, origLine)
+
+                
+    def multiline(self, firstline=''):
+        full_input = []
+        if firstline:
+            print '  ' + firstline
+            full_input.append(firstline)
+        while True:
+            if self.use_rawinput:
+                try:
+                    line = raw_input('| ')
+                except EOFError:
+                    line = 'EOF'
+            else:
+                self.stdout.write('| ')
+                self.stdout.flush()
+                line = self.stdin.readline()
+                if not len(line):
+                    line = 'EOF'
+                else:
+                    line = line[:-1] # chop \n
+            if line == 'EOF':
+                break
+            full_input.append(line)
+        locals = self.curframe.f_locals
+        globals = self.curframe.f_globals
+        print ''
+        try:
+            code = compile('\n'.join(full_input) + '\n', '<stdin>', 'single')
+            exec code in globals, locals
+        except:
+            print self._reprExc()
+
+    def handle_directive(self, line):
+        cmd = line.split('?', 1)
+        if len(cmd) == 1:
+            return False
+        cmd, directive = cmd
+        if directive and directive not in '?cdmpx':
+            return False
+        self.do_define(cmd)
+        if directive == '?':
+            self.do_doc(cmd)
+        if directive == 'c':
+            self.do_showclasses(cmd)
+        elif directive == 'd':
+            self.do_showdata(cmd)
+        elif directive == 'm':
+            self.do_showmethods(cmd)
+        elif directive == 'p':
+            pdb.Pdb.default(self, 'print ' + cmd)
+        elif directive == 'x':
+            pdb.Pdb.default(self, 'hex(%s)' % cmd)
+        return True
+
+
+    def do_p(self, arg):
+        cmd = arg.split('?', 1)
+        if len(cmd) == 1:
+            pdb.Pdb.do_p(self, arg)
+        else:
+            self.default(arg)
+
+    def _showmethods(self, obj):
+        methods = self._getMembersOfType(obj, 'm')
+        methods.sort()
+        for (methodName, method) in methods:
+            try:
+                self._define(method)
+            except:
+                if hasattr(obj, '__name__'):
+                    prefix = obj.__name__
+                else:
+                    prefix = obj.__class__.__name__
+                print prefix + '.' + methodName
+
+    def _showdata(self, obj):
+        data = self._getMembersOfType(obj, 'd')
+        data.sort()
+        print [ x[0] for x in data]
+
+    def _showclasses(self, obj):
+        classes = self._getMembersOfType(obj, 'c')
+        classes.sort()
+        for (className, class_) in classes:
+            self._define(class_)
+            print
+
+    def _objtype(self, obj):
+        if inspect.isroutine(obj) or type(obj).__name__ == 'method-wrapper':
+            return 'm'
+        elif inspect.isclass(obj):
+            return 'c'
+        else:
+            return 'd'
+
+    def _eval(self, arg, fn=None, printExc=True):
+        locals = self.curframe.f_locals
+        globals = self.curframe.f_globals
+        try:
+            result = eval(arg + '\n', globals, locals) 
+            if fn is None:
+                return True, result
+            return True, fn(result)
+        except:
+            if printExc:
+                exc = self._reprExc()
+                print exc
+                return False, exc
+            else:
+                return False, self._reprExc()
+
+    def _reprExc(self):
+        t, v = sys.exc_info()[:2]
+        if type(t) == type(''):
+            exc_type_name = t
+        else: exc_type_name = t.__name__
+        return ' '.join(('***', exc_type_name + ':', _saferepr(str(v))))
+
+    def _getMembersOfType(self, obj, objType):
+        names = dir(obj)
+        members = []
+        for n in names:
+            member = getattr(obj, n)
+            if self._objtype(member) == objType:
+                members.append((n, member))
+        return members
+    
+    def do_showmethods(self, arg):
+        self._eval(arg, self._showmethods)
+
+    def do_showclasses(self, arg):
+        self._eval(arg, self._showclasses)
+
+    def do_display(self, arg):
+        if not arg:
+            self._displayItems()
+        else:
+            params = arg.split()
+            if params[0] == 'list' and not params[1:]:
+                self._listDisplayItems()
+            elif params[0] in ('enable','disable','delete'):
+                try:
+                    nums = [int(x) for x in params[1:]]
+                except ValueError, msg:
+                    print '***', ValueError, msg
+                    return
+                missing = []
+                _nums = []
+
+                for num in nums:
+                    if num in self._displayList:
+                        _nums.append(num)
+                    else:
+                        missing.append(str(num))
+                if params[0] == 'enable':
+                    for num in _nums:
+                        self._displayList[num][0] = True
+                if params[0] == 'disable':
+                    for num in _nums:
+                        self._displayList[num][0] = False
+                if params[0] == 'delete':
+                    for num in nums:
+                        del self._displayList[num]
+                self._listDisplayItems()
+                if missing:
+                    print "Warning: could not find display num(s) %s" \
+                                                        % ','.join(missing)
+            else:
+                if self._displayList:
+                    displayNum = max(self._displayList) + 1
+                else:
+                    displayNum = 0
+                self._displayList[displayNum] = [True, arg]
+                self._listDisplayItems()
+
+    def _listDisplayItems(self):
+        displayedItem = False
+        for num in sorted(self._displayList.iterkeys()):
+            if not displayedItem:
+                displayedItem = True
+                print
+                print "Cmds to display:"
+            enabled, item = self._displayList[num]
+            if not enabled:
+                print "%d: %s (disabled)" % (num, item)
+            else:
+                print "%d: %s" % (num, item)
+        if displayedItem:
+            print
+        else:
+            print "*** No items set to display at each cmd"
+
+
+    def _displayItems(self):
+        displayedItem = False
+        for num in sorted(self._displayList.iterkeys()):
+            enabled, item = self._displayList[num]
+            if not enabled:
+                continue
+            if not displayedItem:
+                displayedItem = True
+                print
+            passed, result = self._eval(item, printExc = False)
+            print "%d: %s = %s" % (num, item, _saferepr(result))
+        if displayedItem:
+            print
+
+    def do_showdata(self, arg):
+        result = self._eval(item, self._showdata)
+
+    def _define(self, obj):
+        if inspect.isclass(obj):
+            bases = inspect.getmro(obj)
+            bases = [ x.__name__ for x in bases[1:] ]
+            if bases:
+                bases = ' -- Bases (' + ', '.join(bases) + ')'
+            else:
+                bases = '' 
+            if hasattr(obj, '__init__') and inspect.isroutine(obj.__init__):
+                try:
+                    initfn = obj.__init__.im_func
+                    argspec = inspect.getargspec(initfn)
+                    # get rid of self from arg list...
+                    fnargs = argspec[0][1:] 
+                    newArgSpec = (fnargs, argspec[1], argspec[2], argspec[3])
+                    argspec = inspect.formatargspec(*newArgSpec)
+                except TypeError:
+                    argspec = '(?)'
+            else:
+                argspec = ''
+            print "Class " + obj.__name__ + argspec + bases
+        elif inspect.ismethod(obj) or type(obj).__name__ == 'method-wrapper':
+            m_class = obj.im_class
+            m_self = obj.im_self
+            m_func = obj.im_func
+            name = m_class.__name__ + '.' +  m_func.__name__
+            #if m_self:
+            #    name = "<Bound>"  + name
+            argspec = inspect.formatargspec(*inspect.getargspec(m_func))
+            print "%s%s" % (name, argspec)
+        elif type(obj).__name__ == 'builtin_function_or_method':
+            print obj
+        elif inspect.isfunction(obj):
+            name = obj.__name__
+            argspec = inspect.formatargspec(*inspect.getargspec(obj))
+            print "%s%s" % (name, argspec)
+        else:
+            print type(obj)
+
+
+    def do_define(self, arg):
+        self._eval(arg, self._define)
+
+    def do_showdata(self, arg):
+        result = self._eval(arg, self._showdata)
+
+    def _define(self, obj):
+        if inspect.isclass(obj):
+            bases = inspect.getmro(obj)
+            bases = [ x.__name__ for x in bases[1:] ]
+            if bases:
+                bases = ' -- Bases (' + ', '.join(bases) + ')'
+            else:
+                bases = '' 
+            if hasattr(obj, '__init__') and inspect.isroutine(obj.__init__):
+                try:
+                    initfn = obj.__init__.im_func
+                    argspec = inspect.getargspec(initfn)
+                    # get rid of self from arg list...
+                    fnargs = argspec[0][1:] 
+                    newArgSpec = (fnargs, argspec[1], argspec[2], argspec[3])
+                    argspec = inspect.formatargspec(*newArgSpec)
+                except TypeError:
+                    argspec = '(?)'
+            else:
+                argspec = ''
+            print "Class " + obj.__name__ + argspec + bases
+        elif inspect.ismethod(obj) or type(obj).__name__ == 'method-wrapper':
+            m_class = obj.im_class
+            m_self = obj.im_self
+            m_func = obj.im_func
+            name = m_class.__name__ + '.' +  m_func.__name__
+            #if m_self:
+            #    name = "<Bound>"  + name
+            argspec = inspect.formatargspec(*inspect.getargspec(m_func))
+            print "%s%s" % (name, argspec)
+        elif type(obj).__name__ == 'builtin_function_or_method':
+            print obj
+        elif inspect.isfunction(obj):
+            name = obj.__name__
+            argspec = inspect.formatargspec(*inspect.getargspec(obj))
+            print "%s%s" % (name, argspec)
+        else:
+            print type(obj)
+
+
+    def do_define(self, arg):
+        self._eval(arg, self._define)
+
+    def do_doc(self, arg):
+        self._eval(arg, self._doc)
+
+    def _doc(self, result):
+        docloc = None
+        if hasattr(result, '__doc__'):
+            if result.__doc__ is not None:
+                docstr = result.__doc__
+            elif inspect.ismethod(result):
+                bases = inspect.getmro(result.im_class)
+                found = False
+                for base in bases:
+                    if hasattr(base, result.__name__):
+                        baseres = getattr(base, result.__name__)
+                        if (hasattr(baseres, '__doc__')
+                            and baseres.__doc__ is not None):
+                            docloc = baseres
+                            docstr = baseres.__doc__
+                            found = True
+                            break
+                if not found:
+                    docstr = None
+            else:
+                docstr = None
+            print "\"\"\"%s\"\"\"" % docstr
+            if docloc:
+                print "(Found doc in %s)" % docloc
+            
+        if inspect.isclass(result):
+            if hasattr(result, '__init__'):
+                self.do_define(arg + '.__init__')
+                if hasattr(result.__init__, '__doc__'):
+                    print "\"\"\"%s\"\"\"" % result.__init__.__doc__
+            else:
+                print "No init function"
+
+    def interaction(self, frame, traceback):
+        self.setup(frame, traceback)
+        self._displayItems()
+        self.print_stack_entry(self.stack[self.curindex])
+        self.cmdloop()
+        self.forget()
+        if not self.__old_stdout is None:
+            sys.stdout.flush()
+            # now we reset stdout to be the whatever it was before
+            sys.stdout = self.__old_stdout
+
+    def switch_stdout(self):
+        isatty = False
+        try:
+            fileno = sys.stdout.fileno()
+            isatty = os.isatty(fileno)
+        except AttributeError:
+            pass
+            # sys.stdout is not a regular file,
+            # go through some hoops
+            # (this is less desirable because it doesn't redirect
+            # low-level writes to 1 
+              
+        if not isatty:
+            sys.stdout.flush()
+            self.__old_stdout = sys.stdout
+            stdout = open('/dev/tty', 'w')
+            sys.stdout = stdout
+        else:
+            self.__old_stdout = None
+
+    # override for cases where we want to search a different
+    # path for the file
+    def canonic(self, filename):
+        canonic = self.fncache.get(filename)
+        if not canonic or not os.path.exists(canonic):
+            canonic = os.path.abspath(filename)
+            canonic = os.path.normcase(canonic)
+            if not os.path.exists(canonic):
+                if 'path' in self._config:
+                    for path in self._config['path']:
+                        pos = matchFileOnDirPath(path, canonic)
+                        if pos:
+                            canonic = pos
+                            break
+                self.fncache[filename] = canonic
+        return canonic
+
+    def reset_trace_count(klass, marker='default'):
+        tc = klass.trace_counts
+        try:
+            tc[marker][1] = 0
+        except KeyError:
+            pass
+    reset_trace_count = classmethod(reset_trace_count)
+
+    def set_trace_cond(klass, marker='default', cond=None):
+        """ Sets a condition for set_trace statements that have the 
+            specified marker.  A condition can either callable, in
+            which case it should take one argument, which is the 
+            number of times set_trace(marker) has been called,
+            or it can be a number, in which case the break will
+            only be called.
+        """
+        tc = klass.trace_counts
+        try:
+            curVals = tc[marker]
+        except KeyError:
+            curVals = [ None, 0 ]
+        tc[marker] = (cond, 0)
+    set_trace_cond = classmethod(set_trace_cond)
+
+    def set_trace(self, marker='default', skip=0):
+        tc = Epdb.trace_counts
+        try:
+            (cond, curCount) = tc[marker]
+            curCount += 1
+        except KeyError:
+            (cond, curCount) = None, 1
+        if cond is True:
+            rv = True
+        elif cond is None or cond is False:
+            rv = False
+        else:
+            try:
+                rv = cond(curCount)
+            except TypeError:
+                # assume that if the condition 
+                # is not callable, it is an 
+                # integer above which we are 
+                # supposed to break
+                rv = curCount >= cond
+        if rv:
+            if marker != 'default':
+                self.prompt = '(Epdb [%s]) ' % marker
+            self._set_trace(skip=skip+1)
+        tc[marker] = [cond, curCount]
+
+    def do_debug(self, arg):
+        sys.settrace(None)
+        globals = self.curframe.f_globals
+        locals = self.curframe.f_locals
+        p = Epdb()
+        p.prompt = "(%s) " % self.prompt.strip()
+        print "ENTERING RECURSIVE DEBUGGER"
+        sys.call_tracing(p.run, (arg, globals, locals))
+        print "LEAVING RECURSIVE DEBUGGER"
+        sys.settrace(self.trace_dispatch)
+        self.lastcmd = p.lastcmd
+
+    def _set_trace(self, skip=0):
+        """Start debugging from here."""
+        frame = sys._getframe().f_back
+        # go up the specified number of frames
+        for i in range(0,skip):
+            frame = frame.f_back
+        self.reset()
+        while frame:
+            frame.f_trace = self.trace_dispatch
+            self.botframe = frame
+            frame = frame.f_back
+        self.set_step()
+        sys.settrace(self.trace_dispatch)
+
+    # bdb hooks
+    def user_call(self, frame, argument_list):
+        """This method is called when there is the remote possibility
+        that we ever need to stop in this function."""
+        if self.stop_here(frame):
+            self.switch_stdout()
+            pdb.Pdb.user_call(self, frame, argument_list)
+
+    def user_line(self, frame):
+        """This function is called when we stop or break at this line."""
+        self.switch_stdout()
+        pdb.Pdb.user_line(self, frame)
+
+    def user_return(self, frame, return_value):
+        """This function is called when a return trap is set here."""
+        self.switch_stdout()
+        pdb.Pdb.user_return(self, frame, return_value)
+
+    def user_exception(self, frame, exc_info):
+        """This function is called if an exception occurs,
+        but only if we are to stop at or just below this level."""
+        self.switch_stdout()
+        pdb.Pdb.user_exception(self, frame, exc_info)
+
+
+    def complete(self, text, state):
+        if hasReadline:
+            # from cmd.py, override completion to match on local variables
+            allvars = {}
+            globals = self.curframe.f_globals.copy()
+            locals = self.curframe.f_locals.copy()
+            allvars.update(globals)
+            allvars.update(locals)
+            self._completer.namespace = allvars
+            self._completer.use_main_ns = 0
+            matches = self._completer.complete(text, state)
+            return matches
+        else:
+            return pdb.Pdb.complete(self, text, state)
+        
+def beingTraced():
+    frame = sys._getframe(0)
+    while frame:
+        if not frame.f_trace is None:
+            return True
+        frame = frame.f_back
+    return False
+
+def set_trace_cond(*args, **kw):
+    """ Sets a condition for set_trace statements that have the 
+        specified marker.  A condition can either callable, in
+        which case it should take one argument, which is the 
+        number of times set_trace(marker) has been called,
+        or it can be a number, in which case the break will
+        only be called.
+    """
+    for key, val in kw.iteritems():
+        Epdb.set_trace_cond(key, val)
+    for arg in args:
+        Epdb.set_trace_cond(arg, True)
+stc = set_trace_cond
+
+def reset_trace_count(marker='default'):
+    """ Resets the number a set_trace for a marker has been 
+        seen to 0. """
+    Epdb.reset_trace_count(marker)
+
+def set_trace(marker='default'):
+    """ Starts the debugger at the current location.  Takes an
+        optional argument 'marker' (default 'default'), that 
+        can be used with the set_trace_cond function to support 
+        turning on and off tracepoints based on conditionals
+    """
+
+    Epdb().set_trace(marker=marker, skip=1)
+
+st = set_trace
+
+def post_mortem(t, exc_type=None, exc_msg=None):
+    p = Epdb()
+    p._exc_type = exc_type
+    p._exc_msg = exc_msg
+    p._tb = t
+    p.reset()
+    while t.tb_next is not None:
+        t = t.tb_next
+    p.switch_stdout()
+    p.interaction(t.tb_frame, t)
+
+def matchFileOnDirPath(curpath, pathdir):
+    """Find match for a file by slicing away its directory elements
+       from the front and replacing them with pathdir.  Assume that the
+       end of curpath is right and but that the beginning may contain
+       some garbage (or it may be short)
+       Overlaps are allowed:
+       e.g /tmp/fdjsklf/real/path/elements, /all/the/real/ =>
+       /all/the/real/path/elements (assuming that this combined
+       path exists)
+    """
+    if os.path.exists(curpath):
+        return curpath
+    filedirs = curpath.split('/')[1:]
+    filename = filedirs[-1]
+    filedirs = filedirs[:-1]
+    if pathdir[-1] == '/':
+        pathdir = pathdir[:-1]
+    # assume absolute paths
+    pathdirs = pathdir.split('/')[1:]
+    lp = len(pathdirs)
+    # Cut off matching file elements from the ends of the two paths
+    for x in range(1, min(len(filedirs), len(pathdirs))):
+        # XXX this will not work if you have 
+        # /usr/foo/foo/filename.py
+        if filedirs[-1] == pathdirs[-x]:
+            filedirs = filedirs[:-1]
+        else:
+            break
+
+    # Now cut try cuting off incorrect initial elements of curpath
+    while filedirs:
+        tmppath = '/' + '/'.join(pathdirs + filedirs + [filename]) 
+        if os.path.exists(tmppath):
+            return tmppath
+        filedirs = filedirs[1:]
+    tmppath = '/' + '/'.join(pathdirs + [filename])
+    if os.path.exists(tmppath):
+       return tmppath
+    return None
+
+def _removeQuotes(line):
+    origLine = line
+    line = line.replace(r'\\', 'X')
+    line = re.sub(r'\\\"|\\\'', 'X', line)
+    line = _removeQuoteSet(line, '"""', "'''")
+    if line is None: return None
+    if line != _removeQuoteSet(line, '""', "''"):
+        return origLine
+    line =  _removeQuoteSet(line, '"', "'")
+    if line is None:
+        return origLine
+    return line
+
+def _removeQuoteSet(line, quote1, quote2):
+    ln = len(quote1)
+    while True:
+        a = line.find(quote1), quote1   
+        b = line.find(quote2), quote2
+        if a[0] == -1 and b[0] == -1:             
+            return line
+        if b[0] == -1 or (b[0] < a[0]):
+            firstPoint = a[0]
+            firstQuote = a[1]
+        else:
+            firstPoint = b[0]
+            firstQuote = b[1]
+        secondPoint = line[(firstPoint+ln):].find(firstQuote)
+        if secondPoint == -1:
+            return None
+        secondPoint += firstPoint
+        line = line[:firstPoint] + line[(secondPoint+2*ln):]
+
diff -r 000000000000 -r eda27f1c800a stackutil.py
--- /dev/null	Thu Jan  1 00:00:00 1970
+++ b/stackutil.py	Wed Nov  9 19:04:20 2005
@@ -0,0 +1,151 @@
+#
+# Copyright (c) 2004 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/cpl.php.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any waranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+""" Tools for printing out extended information about frame variables """
+
+import inspect
+import smtplib
+import sys
+import string
+import tempfile
+import traceback
+import xmlrpclib
+
+from repr import Repr
+_repr = Repr()
+_repr.maxstring = 3000
+_saferepr = _repr.repr
+
+def printTraceBack(tb=None, output=sys.stderr, exc_type=None, exc_msg=None):
+    if isinstance(output, str):
+        output = open(output, 'w')
+
+    exc_info = sys.exc_info()
+    if tb is None:
+        tb = exc_info[2]
+
+    if exc_type is None:
+        exc_type = exc_info[0]
+
+    if exc_msg is None:
+        exc_msg = exc_info[1]
+
+    if exc_type is not None:
+        output.write('Exception: ')
+        exc_info = '\n'.join(traceback.format_exception_only(exc_type, exc_msg))
+        output.write(exc_info)
+        output.write('\n\n')
+
+    lines = traceback.format_exception(exc_type, exc_msg, tb)
+    output.write(string.joinfields(lines, ""))
+
+    while tb:
+        _printFrame(tb.tb_frame, output=output)
+        tb = tb.tb_next
+
+def printFrame(frame=0, output=sys.stderr):
+    # if output is a path, assume it is a writable one
+    # otherwise, it must be an already opened file
+    if isinstance(output, str):
+        output = open(output, 'w')
+    # skip this frame because who cares about the printFrame func?
+    if isinstance(frame, int):
+        # stack was given in depth form
+        # (skip the current frame when counting depth)
+        frame = sys._getframe(frame + 1)
+    _printFrame(frame, output)
+
+def printStack(frame=0, output=sys.stderr):
+    if isinstance(output, str):
+        output = open(output, 'w')
+    if isinstance(frame, int):
+        # stack was given in depth form
+        # (skip the current frame when counting depth)
+        frame = sys._getframe(frame + 1)
+    while(frame):
+        output.write("*************************************\n")
+        _printFrame(frame, output)
+        frame = frame.f_back
+
+def mailStack(frame, recips, sender, subject, extracontent=None):
+    file = tempfile.TemporaryFile()
+    file.write('Subject: ' +  subject + '\n\n')
+    if extracontent:
+        file.write(extracontent)
+    printStack(frame, file)
+    server = smtplib.SMTP('localhost')
+    file.seek(0)
+    server.sendmail(sender,
+                    recips,
+                    file.read())
+    server.close()
+    file.close()
+
+def _printFrame(f, output=sys.stderr):
+    c = f.f_code
+    argcount =  c.co_argcount
+    varnames = c.co_varnames
+    args = varnames[:argcount]
+    locals = f.f_locals
+    globals = f.f_globals
+    output.write(">> %s:%s: %s.%s(%s)\n" % ( c.co_filename, f.f_lineno, globals['__name__'], c.co_name, ', '.join(args) ))
+
+    localkeys = [ l for l in f.f_locals.keys() if not inspect.ismodule(locals[l] ) ] 
+    if argcount > 0:
+        output.write("  Params: \n")
+        for var in varnames[:argcount]:
+            if var in locals:
+                val = locals[var]
+                val = _getStringValue(val)
+                localkeys.remove(var)
+            else:
+                val = '<Unknown>'
+
+            output.write("    %s = %s\n" % (var, _saferepr(val)))
+    for hidden in ('__file__', '__name__', '__doc__'):
+        if hidden in localkeys:
+            localkeys.remove(hidden)
+    localkeys.sort()
+    if localkeys:
+        output.write("  Locals: \n")
+        for key in localkeys:
+            if key in locals:
+                val = locals[key]
+                val = _getStringValue(val)
+            else:
+                val = '<Unknown>'
+            output.write("    %s = %r\n" % (key, _saferepr(val)))
+
+def _getStringValue(val):
+    try:
+        if isinstance(val, xmlrpclib.ServerProxy):
+            rval = "<Server Proxy>"
+        elif hasattr(val, 'asString'):
+            rval = val.asString()
+        elif inspect.isclass(val):
+            rval = '<Class %s.%s>' % (val.__module__, val.__name__)
+        elif not hasattr(val, '__str__'):
+            if hasattr(val, '__class__'):
+                rval = '<unprintable of class %s>' % val.__class__
+            else:
+                rval = '<unprintable>'
+        else:
+            rval = val
+        return rval
+    except Exception, e:
+        try:
+            return '<Exception occured while converting %s to string: %s' %(repr(val), e)
+        except Exception, e:
+            return '<Exception occured while converting to repr: %s' %(e)
+

From dbc@rpath.com Fri Nov 11 10:00:30 2005
Received: from ms-smtp-04-eri0.southeast.rr.com
	(ms-smtp-04-lbl.southeast.rr.com [24.25.9.103])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jABF0TCx022444
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 10:00:29 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jABF0H1u015152 for <epdb-commits@lists.rpath.com>;
	Fri, 11 Nov 2005 10:00:17 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jABF0GJ0009372
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 11 Nov 2005 10:00:16 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jABF0Gix009371
	for epdb-commits@lists.rpath.com; Fri, 11 Nov 2005 10:00:16 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200511111500.jABF0Gix009371@lambchop.rdu.rpath.com>
Date: Fri, 11 Nov 2005 10:00:16 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: add erlcompleter
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 11 Nov 2005 15:00:30 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/Makefile epdb/erlcompleter.py

add erlcompleter

diff -r f2a95bc60d92 -r 42ff59758874 epdb/Makefile
--- a/epdb/Makefile	Thu Nov 10 21:10:06 2005
+++ b/epdb/Makefile	Fri Nov 11 15:00:11 2005
@@ -5,6 +5,7 @@
 
 python_files = __init__.py	\
                epdb.py          \
+               erlcompleter.py  \
                stackutil.py     
 
 dist_files = $(extra_files) $(python_files)
diff -r f2a95bc60d92 -r 42ff59758874 epdb/erlcompleter.py
--- /dev/null	Thu Nov 10 21:10:06 2005
+++ b/epdb/erlcompleter.py	Fri Nov 11 15:00:11 2005
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2004-2005 rPath, Inc.
+#
+# This program is distributed under the terms of the MIT License as found 
+# in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/mit-license.php.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any waranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the MIT License for full details.
+
+import rlcompleter
+
+class ECompleter(rlcompleter.Completer):
+
+    def global_matches(self, text):
+        """Compute matches when text is a simple name.
+
+        Return a list of all keywords, built-in functions and names currently
+        defined in self.namespace that match.
+
+        """
+# lines commented out make tab completion match keywords and builtins,
+# which we don't want 
+#        import keyword
+        matches = []
+        n = len(text)
+        for list in [
+#                   keyword.kwlist,
+#                     __builtin__.__dict__,
+                     self.namespace]:
+            for word in list:
+                if word[:n] == text and word != "__builtins__":
+                    matches.append(word)
+        return matches
+

From dbc@rpath.com Tue Dec 20 12:51:34 2005
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jBKHpYN5030937
	for <epdb-commits@lists.rpath.com>; Tue, 20 Dec 2005 12:51:34 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jBKHp44p006623 for <epdb-commits@lists.rpath.com>;
	Tue, 20 Dec 2005 12:51:04 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jBKHp3RN031630
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 20 Dec 2005 12:51:03 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jBKHp3MD031626
	for epdb-commits@lists.rpath.com; Tue, 20 Dec 2005 12:51:03 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200512201751.jBKHp3MD031626@lambchop.rdu.rpath.com>
Date: Tue, 20 Dec 2005 12:51:03 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: add command line history to epdb
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 20 Dec 2005 17:51:35 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

add command line history to epdb

diff -r 42ff59758874 -r b06a890a536a epdb/epdb.py
--- a/epdb/epdb.py	Fri Nov 11 15:00:11 2005
+++ b/epdb/epdb.py	Tue Dec 20 17:51:13 2005
@@ -11,6 +11,7 @@
 
 
 """ Extended pdb """
+import atexit
 import stackutil
 import inspect
 import pdb
@@ -39,7 +40,10 @@
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
 
+    _historyPath = os.path.expanduser('~/.epdbhistory')
+
     def __init__(self):
+        
         self._exc_type = None
         self._exc_msg = None
         self._tb = None
@@ -47,7 +51,16 @@
         pdb.Pdb.__init__(self)
         if hasReadline:
             self._completer = erlcompleter.ECompleter()
+            if self._historyPath:
+                if os.path.exists(self._historyPath):
+                    readline.read_history_file(self._historyPath)
+                atexit.register(self._save_history)
+
         self.prompt = '(Epdb) '
+
+    def _save_history(self):
+        if self._historyPath:
+            readline.write_history_file(self._historyPath)
     
     def do_savestack(self, path):
         

From dbc@rpath.com Tue Dec 20 12:52:20 2005
Received: from ms-smtp-04-eri0.southeast.rr.com
	(ms-smtp-04-lbl.southeast.rr.com [24.25.9.103])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id jBKHqJCp030945
	for <epdb-commits@lists.rpath.com>; Tue, 20 Dec 2005 12:52:19 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	jBKHpn1u010919 for <epdb-commits@lists.rpath.com>;
	Tue, 20 Dec 2005 12:51:50 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id jBKHpndW031762
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 20 Dec 2005 12:51:49 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id jBKHpnXs031758
	for epdb-commits@lists.rpath.com; Tue, 20 Dec 2005 12:51:49 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200512201751.jBKHpnXs031758@lambchop.rdu.rpath.com>
Date: Tue, 20 Dec 2005 12:51:49 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.8.1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 20 Dec 2005 17:52:20 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       Makefile NEWS

0.8.1

diff -r b06a890a536a -r a4bb295dbda6 Makefile
--- a/Makefile	Tue Dec 20 17:51:13 2005
+++ b/Makefile	Tue Dec 20 17:52:14 2005
@@ -1,4 +1,4 @@
-export VERSION = 0.8
+export VERSION = 0.8.1
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
diff -r b06a890a536a -r a4bb295dbda6 NEWS
--- a/NEWS	Tue Dec 20 17:51:13 2005
+++ b/NEWS	Tue Dec 20 17:52:14 2005
@@ -1,2 +1,4 @@
+Changes in 0.8.1:
+    * Add cross-session readline history 
 Changes in 0.8:
     * Initial seperate epdb release

From dbc@rpath.com Thu Jan  5 10:36:53 2006
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id k05FarbX016330
	for <epdb-commits@lists.rpath.com>; Thu, 5 Jan 2006 10:36:53 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	k05Fal4p013403
	for <epdb-commits@lists.rpath.com>; Thu, 5 Jan 2006 10:36:47 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id k05FakTX016062
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Thu, 5 Jan 2006 10:36:46 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id k05FakEK016058
	for epdb-commits@lists.rpath.com; Thu, 5 Jan 2006 10:36:46 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200601051536.k05FakEK016058@lambchop.rdu.rpath.com>
Date: Thu, 05 Jan 2006 10:36:46 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: fix bug with ever-growing history file
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 05 Jan 2006 15:36:54 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

fix bug with ever-growing history file

diff -r a4bb295dbda6 -r e02d7e8c3f3e epdb/epdb.py
--- a/epdb/epdb.py	Tue Dec 20 17:52:14 2005
+++ b/epdb/epdb.py	Thu Jan  5 15:37:21 2006
@@ -51,15 +51,17 @@
         pdb.Pdb.__init__(self)
         if hasReadline:
             self._completer = erlcompleter.ECompleter()
-            if self._historyPath:
-                if os.path.exists(self._historyPath):
-                    readline.read_history_file(self._historyPath)
-                atexit.register(self._save_history)
 
         self.prompt = '(Epdb) '
 
-    def _save_history(self):
-        if self._historyPath:
+    def read_history(self):
+        if (hasReadline and self._historyPath 
+            and os.path.exists(self._historyPath)):
+            readline.read_history_file(self._historyPath)
+        
+    def save_history(self):
+        if hasReadline and self._historyPath:
+            readline.set_history_length(1000)
             readline.write_history_file(self._historyPath)
     
     def do_savestack(self, path):
@@ -602,11 +604,13 @@
                 print "No init function"
 
     def interaction(self, frame, traceback):
+        self.read_history()
         self.setup(frame, traceback)
         self._displayItems()
         self.print_stack_entry(self.stack[self.curindex])
         self.cmdloop()
         self.forget()
+        self.save_history()
         if not self.__old_stdout is None:
             sys.stdout.flush()
             # now we reset stdout to be the whatever it was before

From dbc@rpath.com Fri Jan  6 13:07:23 2006
Received: from ms-smtp-01-eri0.southeast.rr.com
	(ms-smtp-01-lbl.southeast.rr.com [24.25.9.100])
	by lists.rpath.com (8.13.4/8.13.4) with ESMTP id k06I7NQr018559
	for <epdb-commits@lists.rpath.com>; Fri, 6 Jan 2006 13:07:23 -0500
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	k06I7GWe010301
	for <epdb-commits@lists.rpath.com>; Fri, 6 Jan 2006 13:07:17 -0500 (EST)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.4/8.13.4) with ESMTP id k06I7GZ5014626
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 6 Jan 2006 13:07:16 -0500
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.4/8.13.4/Submit) id k06I7F8u014622
	for epdb-commits@lists.rpath.com; Fri, 6 Jan 2006 13:07:15 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200601061807.k06I7F8u014622@lambchop.rdu.rpath.com>
Date: Fri, 06 Jan 2006 13:07:15 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: don't fail if historyPath is not writable
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 06 Jan 2006 18:07:23 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

don't fail if historyPath is not writable

diff -r e02d7e8c3f3e -r 6195650077c7 epdb/epdb.py
--- a/epdb/epdb.py	Thu Jan  5 15:37:21 2006
+++ b/epdb/epdb.py	Fri Jan  6 18:07:51 2006
@@ -55,14 +55,19 @@
         self.prompt = '(Epdb) '
 
     def read_history(self):
-        if (hasReadline and self._historyPath 
-            and os.path.exists(self._historyPath)):
-            readline.read_history_file(self._historyPath)
+        if hasReadline and self._historyPath:
+            try:
+                readline.read_history_file(self._historyPath)
+            except:
+                pass
         
     def save_history(self):
         if hasReadline and self._historyPath:
             readline.set_history_length(1000)
-            readline.write_history_file(self._historyPath)
+            try:
+                readline.write_history_file(self._historyPath)
+            except:
+                pass
     
     def do_savestack(self, path):
         

From dbc@rpath.com Mon Apr  3 00:20:59 2006
Received: from ms-smtp-03-eri0.southeast.rr.com
	(ms-smtp-03-lbl.southeast.rr.com [24.25.9.102])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k334KwcU015225
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:58 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k334KSQi007065
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:28 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k334KSVs017355
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:28 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k334KRPv017325
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 00:20:27 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030420.k334KRPv017325@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 00:20:27 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: solve problems with history, cause epdb history to play
	nicely with other 
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 04:20:59 -0000

user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

solve problems with history, cause epdb history to play nicely with other 
entities that use readline

diff -r 6195650077c7 -r 3998a9976f30 epdb/epdb.py
--- a/epdb/epdb.py	Fri Jan  6 14:07:51 2006 -0400
+++ b/epdb/epdb.py	Mon Apr  3 00:06:44 2006 -0400
@@ -11,7 +11,6 @@
 
 
 """ Extended pdb """
-import atexit
 import stackutil
 import inspect
 import pdb
@@ -41,9 +40,10 @@ class Epdb(pdb.Pdb):
     trace_counts = {'default' : [ True, 0 ]}
 
     _historyPath = os.path.expanduser('~/.epdbhistory')
+    prompt = '(Epdb) '
+    multiline_prompt = '| '
 
     def __init__(self):
-        
         self._exc_type = None
         self._exc_msg = None
         self._tb = None
@@ -53,24 +53,48 @@ class Epdb(pdb.Pdb):
             self._completer = erlcompleter.ECompleter()
 
         self.prompt = '(Epdb) '
-
-    def read_history(self):
+        self._oldHistory = []
+
+    def store_old_history(self):
+        historyLen = readline.get_current_history_length()
+        oldHistory = [ readline.get_history_item(x) for x in xrange(historyLen)]
+        self._oldHistory = oldHistory
+        readline.clear_history()
+
+    def restore_old_history(self):
+        readline.clear_history()
+        for line in self._oldHistory:
+            if line is None:
+                continue
+            readline.add_history(line)
+        self._oldHistory = []
+
+    def read_history(self, storeOldHistory=False):
         if hasReadline and self._historyPath:
+            if storeOldHistory:
+                self.store_old_history()
+            else:
+                readline.clear_history()
+
             try:
                 readline.read_history_file(self._historyPath)
             except:
                 pass
-        
-    def save_history(self):
+
+    def save_history(self, restoreOldHistory=False):
         if hasReadline and self._historyPath:
             readline.set_history_length(1000)
             try:
                 readline.write_history_file(self._historyPath)
             except:
                 pass
-    
+
+            if restoreOldHistory:
+                self.restore_old_history()
+            else:
+                readline.clear_history()
+
     def do_savestack(self, path):
-        
         if 'stack' in self.__dict__:
             # when we're saving we always 
             # start from the top
@@ -271,22 +295,31 @@ class Epdb(pdb.Pdb):
             return self.multiline(origLine)
         if line.count('(') > line.count(')'):
             return self.multiline(origLine)
-        return pdb.Pdb.default(self, origLine)
-
-                
+        try:
+            self.save_history()
+            return pdb.Pdb.default(self, line)
+        finally:
+            self.read_history()
+            
+
     def multiline(self, firstline=''):
         full_input = []
+        # keep a list of the entries that we've made in history
+        old_hist = []
         if firstline:
             print '  ' + firstline
             full_input.append(firstline)
         while True:
+            if hasReadline:
+                # add the current readline position
+                old_hist.append(readline.get_current_history_length())
             if self.use_rawinput:
                 try:
-                    line = raw_input('| ')
+                    line = raw_input(self.multiline_prompt)
                 except EOFError:
                     line = 'EOF'
             else:
-                self.stdout.write('| ')
+                self.stdout.write(self.multiline_prompt)
                 self.stdout.flush()
                 line = self.stdin.readline()
                 if not len(line):
@@ -296,14 +329,39 @@ class Epdb(pdb.Pdb):
             if line == 'EOF':
                 break
             full_input.append(line)
+
+        # add the final readline history position
+        if hasReadline:
+            old_hist.append(readline.get_current_history_length())
+
+        cmd = '\n'.join(full_input) + '\n'
+
+        if hasReadline:
+            # remove the old, individual readline history entries.
+
+            # first remove any duplicate entries
+            old_hist = sorted(set(old_hist))
+
+            # Make sure you do this in reversed order so you move from
+            # the end of the history up.
+            for pos in reversed(old_hist):
+                # get_current_history_length returns pos + 1
+                readline.remove_history_item(pos - 1)
+            # now add the full line
+            readline.add_history(cmd)
+
         locals = self.curframe.f_locals
         globals = self.curframe.f_globals
-        print ''
+        print
+        self.save_history()
         try:
-            code = compile('\n'.join(full_input) + '\n', '<stdin>', 'single')
-            exec code in globals, locals
-        except:
-            print self._reprExc()
+            try:
+                code = compile(cmd, '<stdin>', 'single')
+                exec code in globals, locals
+            except:
+                print self._reprExc()
+        finally:
+            self.read_history()
 
     def handle_directive(self, line):
         cmd = line.split('?', 1)
@@ -331,7 +389,9 @@ class Epdb(pdb.Pdb):
     def do_p(self, arg):
         cmd = arg.split('?', 1)
         if len(cmd) == 1:
+            self.save_history()
             pdb.Pdb.do_p(self, arg)
+            self.read_history()
         else:
             self.default(arg)
 
@@ -609,13 +669,13 @@ class Epdb(pdb.Pdb):
                 print "No init function"
 
     def interaction(self, frame, traceback):
-        self.read_history()
+        self.read_history(storeOldHistory=True)
         self.setup(frame, traceback)
         self._displayItems()
         self.print_stack_entry(self.stack[self.curindex])
         self.cmdloop()
         self.forget()
-        self.save_history()
+        self.save_history(restoreOldHistory=True)
         if not self.__old_stdout is None:
             sys.stdout.flush()
             # now we reset stdout to be the whatever it was before

From dbc@rpath.com Mon Apr  3 00:20:59 2006
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k334KxQq015228
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:59 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k334KTAP004077
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:29 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k334KSvh017377
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:28 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k334KSqi017357
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 00:20:28 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030420.k334KSqi017357@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 00:20:28 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: switch stdin as well as stdout if necessary
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 04:21:00 -0000

user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

switch stdin as well as stdout if necessary

diff -r 3998a9976f30 -r da9d6fc63c97 epdb/epdb.py
--- a/epdb/epdb.py	Mon Apr  3 00:06:44 2006 -0400
+++ b/epdb/epdb.py	Mon Apr  3 00:17:52 2006 -0400
@@ -676,10 +676,19 @@ class Epdb(pdb.Pdb):
         self.cmdloop()
         self.forget()
         self.save_history(restoreOldHistory=True)
+        self.restore_input_output()
+
+    def switch_input_output(self):
+        self.switch_stdout()
+        self.switch_stdin()
+
+    def restore_input_output(self):
         if not self.__old_stdout is None:
             sys.stdout.flush()
             # now we reset stdout to be the whatever it was before
             sys.stdout = self.__old_stdout
+        if not self.__old_stdin is None:
+            sys.stdin = self.__old_stdin
 
     def switch_stdout(self):
         isatty = False
@@ -691,15 +700,37 @@ class Epdb(pdb.Pdb):
             # sys.stdout is not a regular file,
             # go through some hoops
             # (this is less desirable because it doesn't redirect
-            # low-level writes to 1 
-              
+            # low-level writes to 1)
+
         if not isatty:
             sys.stdout.flush()
             self.__old_stdout = sys.stdout
+            # if this fails, we'll raise an IOError
             stdout = open('/dev/tty', 'w')
             sys.stdout = stdout
         else:
             self.__old_stdout = None
+
+    def switch_stdin(self):
+        isatty = False
+        try:
+            fileno = sys.stdin.fileno()
+            isatty = os.isatty(fileno)
+        except AttributeError:
+            pass
+            # sys.stdout is not a regular file,
+            # go through some hoops
+            # (this is less desirable because it doesn't redirect
+            # low-level writes to 1)
+
+        if not isatty:
+            sys.stdin.flush()
+            self.__old_stdin = sys.stdin
+            # if this fails, we'll raise an IOError
+            stdin = open('/dev/tty', 'r')
+            sys.stdin = stdin
+        else:
+            self.__old_stdin = None
 
     # override for cases where we want to search a different
     # path for the file
@@ -799,23 +830,23 @@ class Epdb(pdb.Pdb):
         """This method is called when there is the remote possibility
         that we ever need to stop in this function."""
         if self.stop_here(frame):
-            self.switch_stdout()
+            self.switch_input_output()
             pdb.Pdb.user_call(self, frame, argument_list)
 
     def user_line(self, frame):
         """This function is called when we stop or break at this line."""
-        self.switch_stdout()
+        self.switch_input_output()
         pdb.Pdb.user_line(self, frame)
 
     def user_return(self, frame, return_value):
         """This function is called when a return trap is set here."""
-        self.switch_stdout()
+        self.switch_input_output()
         pdb.Pdb.user_return(self, frame, return_value)
 
     def user_exception(self, frame, exc_info):
         """This function is called if an exception occurs,
         but only if we are to stop at or just below this level."""
-        self.switch_stdout()
+        self.switch_input_output()
         pdb.Pdb.user_exception(self, frame, exc_info)
 
 
@@ -880,7 +911,7 @@ def post_mortem(t, exc_type=None, exc_ms
     p.reset()
     while t.tb_next is not None:
         t = t.tb_next
-    p.switch_stdout()
+    p.switch_input_output()
     p.interaction(t.tb_frame, t)
 
 def matchFileOnDirPath(curpath, pathdir):

From dbc@rpath.com Mon Apr  3 00:21:00 2006
Received: from ms-smtp-01-eri0.southeast.rr.com
	(ms-smtp-01-lbl.southeast.rr.com [24.25.9.100])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k334L0lQ015232
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:21:00 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k334KTq4027150
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:30 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k334KSYv017438
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:29 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k334KSFn017410
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 00:20:28 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030420.k334KSFn017410@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 00:20:28 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: update news for 0.9
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 04:21:01 -0000

user:        David Christian <http://bugs.rpath.com>
files:       NEWS

update news for 0.9

diff -r da9d6fc63c97 -r c134e2f63fb7 NEWS
--- a/NEWS	Mon Apr  3 00:17:52 2006 -0400
+++ b/NEWS	Mon Apr  3 00:22:57 2006 -0400
@@ -1,3 +1,8 @@ Changes in 0.8.1:
+Changes in 0.9: 
+    * readline history should be much more well behaved
+    * multiline entries will be stored as one entry
+    * input is set to /dev/tty as well as output if the current input stream
+      in not a terminal
 Changes in 0.8.1:
     * Add cross-session readline history 
 Changes in 0.8:

From dbc@rpath.com Mon Apr  3 00:21:01 2006
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k334L12k015235
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:21:01 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k334KU5L004108
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:30 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k334KTef017454
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:20:29 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k334KTbv017448
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 00:20:29 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030420.k334KTbv017448@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 00:20:29 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.9
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 04:21:01 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       Makefile

0.9

diff -r c134e2f63fb7 -r fe0817f7d886 Makefile
--- a/Makefile	Mon Apr  3 00:22:57 2006 -0400
+++ b/Makefile	Mon Apr  3 00:23:08 2006 -0400
@@ -1,4 +1,4 @@ export VERSION = 0.8.1
-export VERSION = 0.8.1
+export VERSION = 0.9
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/

From dbc@rpath.com Mon Apr  3 00:45:22 2006
Received: from ms-smtp-02-eri0.southeast.rr.com
	(ms-smtp-02-lbl.southeast.rr.com [24.25.9.101])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k334jM0s015348
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:45:22 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k334iqga019751
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:44:52 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k334iqJZ023858
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:44:52 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k334ipi3023842
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 00:44:51 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030444.k334ipi3023842@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 00:44:51 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: rearrange a bit, add fail_silently_on_ioerror flag to Epdb
	class.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 04:45:23 -0000

user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

rearrange a bit, add fail_silently_on_ioerror flag to Epdb class.

diff -r fe0817f7d886 -r 47ca479950e0 epdb/epdb.py
--- a/epdb/epdb.py	Mon Apr  3 00:23:08 2006 -0400
+++ b/epdb/epdb.py	Mon Apr  3 00:46:16 2006 -0400
@@ -11,6 +11,7 @@
 
 
 """ Extended pdb """
+import bdb
 import stackutil
 import inspect
 import pdb
@@ -32,16 +33,20 @@ from pdb import _saferepr
 from pdb import _saferepr
 
 class Epdb(pdb.Pdb):
+    _historyPath = os.path.expanduser('~/.epdbhistory')
+    prompt = '(Epdb) '
+    multiline_prompt = '| '
+    fail_silently_on_ioerror = False # if set to True, ignore calls to epdb
+                                     # when there is no usable device
+
     # epdb will print to here instead of to sys.stdout,
     # and restore stdout when done
+    __old_stdin  = None
     __old_stdout = None
     _displayList = {}
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
 
-    _historyPath = os.path.expanduser('~/.epdbhistory')
-    prompt = '(Epdb) '
-    multiline_prompt = '| '
 
     def __init__(self):
         self._exc_type = None
@@ -78,7 +83,7 @@ class Epdb(pdb.Pdb):
 
             try:
                 readline.read_history_file(self._historyPath)
-            except:
+            except IOError:
                 pass
 
     def save_history(self, restoreOldHistory=False):
@@ -86,7 +91,7 @@ class Epdb(pdb.Pdb):
             readline.set_history_length(1000)
             try:
                 readline.write_history_file(self._historyPath)
-            except:
+            except IOError:
                 pass
 
             if restoreOldHistory:
@@ -143,8 +148,6 @@ class Epdb(pdb.Pdb):
             while frame.f_globals['__name__'] in ('epdb', 'pdb', 'bdb', 'cmd'):
                 frame = frame.f_back
         stackutil.printStack(frame, sys.stderr)
-
-    
 
     def do_printframe(self, arg):
         if not arg:
@@ -669,6 +672,16 @@ class Epdb(pdb.Pdb):
                 print "No init function"
 
     def interaction(self, frame, traceback):
+        try:
+            self.switch_input_output()
+        except IOError:
+            if True or self.fail_silently_on_ioerror:
+                # pretend like we never saw this breakpoint
+                self.set_continue()
+                return
+            else:
+                raise
+
         self.read_history(storeOldHistory=True)
         self.setup(frame, traceback)
         self._displayItems()
@@ -830,23 +843,19 @@ class Epdb(pdb.Pdb):
         """This method is called when there is the remote possibility
         that we ever need to stop in this function."""
         if self.stop_here(frame):
-            self.switch_input_output()
             pdb.Pdb.user_call(self, frame, argument_list)
 
     def user_line(self, frame):
         """This function is called when we stop or break at this line."""
-        self.switch_input_output()
         pdb.Pdb.user_line(self, frame)
 
     def user_return(self, frame, return_value):
         """This function is called when a return trap is set here."""
-        self.switch_input_output()
         pdb.Pdb.user_return(self, frame, return_value)
 
     def user_exception(self, frame, exc_info):
         """This function is called if an exception occurs,
         but only if we are to stop at or just below this level."""
-        self.switch_input_output()
         pdb.Pdb.user_exception(self, frame, exc_info)
 
 
@@ -911,7 +920,6 @@ def post_mortem(t, exc_type=None, exc_ms
     p.reset()
     while t.tb_next is not None:
         t = t.tb_next
-    p.switch_input_output()
     p.interaction(t.tb_frame, t)
 
 def matchFileOnDirPath(curpath, pathdir):

From dbc@rpath.com Mon Apr  3 00:45:23 2006
Received: from ms-smtp-04-eri0.southeast.rr.com
	(ms-smtp-04-lbl.southeast.rr.com [24.25.9.103])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k334jN6l015351
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:45:23 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k334iqo8005640
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:44:53 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k334iquK023886
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 00:44:52 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k334iqnw023869
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 00:44:52 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030444.k334iqnw023869@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 00:44:52 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: mention fail_silently_on_ioerror
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 04:45:23 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       NEWS

mention fail_silently_on_ioerror

diff -r 47ca479950e0 -r 37c15183ee43 NEWS
--- a/NEWS	Mon Apr  3 00:46:16 2006 -0400
+++ b/NEWS	Mon Apr  3 00:47:38 2006 -0400
@@ -3,6 +3,9 @@ Changes in 0.9:
     * multiline entries will be stored as one entry
     * input is set to /dev/tty as well as output if the current input stream
       in not a terminal
+    * The new fail_silently_on_ioerror config value will allow you to avoid
+      raising an exception when a breakpoint is hit an no terminal is available.      Use with caution as it could allow you to leave unintended breakpoints in
+      your program.
 Changes in 0.8.1:
     * Add cross-session readline history 
 Changes in 0.8:

From dbc@rpath.com Mon Apr  3 01:22:32 2006
Received: from ms-smtp-03-eri0.southeast.rr.com
	(ms-smtp-03-lbl.southeast.rr.com [24.25.9.102])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k335MWc3015470
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 01:22:32 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k335M1An016868
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 01:22:02 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k335M1F4002730
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 01:22:01 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k335M1ks002726
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 01:22:01 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030522.k335M1ks002726@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 01:22:01 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: only store default prompt in one place
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 05:22:32 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

only store default prompt in one place

diff -r 37c15183ee43 -r 0c8a5ea03902 epdb/epdb.py
--- a/epdb/epdb.py	Mon Apr  3 00:47:38 2006 -0400
+++ b/epdb/epdb.py	Mon Apr  3 01:24:54 2006 -0400
@@ -57,7 +57,6 @@ class Epdb(pdb.Pdb):
         if hasReadline:
             self._completer = erlcompleter.ECompleter()
 
-        self.prompt = '(Epdb) '
         self._oldHistory = []
 
     def store_old_history(self):

From dbc@rpath.com Mon Apr  3 01:27:19 2006
Received: from ms-smtp-04-eri0.southeast.rr.com
	(ms-smtp-04-lbl.southeast.rr.com [24.25.9.103])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k335RJOY015492
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 01:27:19 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04-eri0.southeast.rr.com (8.13.4/8.13.4) with ESMTP id
	k335QniU002251
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 01:26:49 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k335QmEs004254
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 3 Apr 2006 01:26:48 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k335QmgJ004250
	for epdb-commits@lists.rpath.com; Mon, 3 Apr 2006 01:26:48 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200604030526.k335QmgJ004250@lambchop.rdu.rpath.com>
Date: Mon, 03 Apr 2006 01:26:48 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: fixes: prompt cannot be set until after Pdb.__init__ is
	called, call Pdb.default with origLine
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2006 05:27:19 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

fixes: prompt cannot be set until after Pdb.__init__ is called, call Pdb.default with origLine

diff -r 0c8a5ea03902 -r 5281331f6497 epdb/epdb.py
--- a/epdb/epdb.py	Mon Apr  3 01:24:54 2006 -0400
+++ b/epdb/epdb.py	Mon Apr  3 01:29:53 2006 -0400
@@ -34,7 +34,6 @@ from pdb import _saferepr
 
 class Epdb(pdb.Pdb):
     _historyPath = os.path.expanduser('~/.epdbhistory')
-    prompt = '(Epdb) '
     multiline_prompt = '| '
     fail_silently_on_ioerror = False # if set to True, ignore calls to epdb
                                      # when there is no usable device
@@ -58,6 +57,7 @@ class Epdb(pdb.Pdb):
             self._completer = erlcompleter.ECompleter()
 
         self._oldHistory = []
+        self.prompt = '(Epdb) '
 
     def store_old_history(self):
         historyLen = readline.get_current_history_length()
@@ -299,7 +299,7 @@ class Epdb(pdb.Pdb):
             return self.multiline(origLine)
         try:
             self.save_history()
-            return pdb.Pdb.default(self, line)
+            return pdb.Pdb.default(self, origLine)
         finally:
             self.read_history()
             

From dbc@rpath.com Mon May  1 00:06:37 2006
Received: from ms-smtp-04.southeast.rr.com (ms-smtp-04.southeast.rr.com
	[24.25.9.103])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k4146bBe030630
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:06:37 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k4145uNL019337
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:05:57 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k4145uCV007836
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:05:56 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k4145tAl007821
	for epdb-commits@lists.rpath.com; Mon, 1 May 2006 00:05:56 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200605010405.k4145tAl007821@lambchop.rdu.rpath.com>
Date: Mon, 01 May 2006 00:05:55 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: make until work with filenames,
	make the lookup module fn a little smarter about symlinks,
	remove duplicate code
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 01 May 2006 04:06:37 -0000

user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

make until work with filenames, make the lookup module fn a little smarter about symlinks, remove duplicate code

diff -r 5281331f6497 -r 020b6689e126 epdb/epdb.py
--- a/epdb/epdb.py	Mon Apr  3 01:29:53 2006 -0400
+++ b/epdb/epdb.py	Mon May  1 00:11:30 2006 -0400
@@ -177,14 +177,9 @@ class Epdb(pdb.Pdb):
     do_f = do_file
 
     def do_until(self, arg):
-        try:
-            int(arg)
-        except ValueError:
-            print "Error: only specify line numbers for until"
-            return 0
-        filename = self.canonic(self.curframe.f_code.co_filename)
-        if self.checkline(filename, int(arg)):
-            self.do_tbreak(arg)
+        numBreaks = len(self.breaks)
+        self.do_tbreak(arg)
+        if len(self.breaks) > numBreaks:
             self.set_continue()
             return 1
         else:
@@ -280,6 +275,36 @@ class Epdb(pdb.Pdb):
             pdb.Pdb.do_list(self, arg)
 
     do_l = do_list
+
+    def lookupmodule(self, filename):
+        """Helper function for break/clear parsing -- may be overridden.
+
+        lookupmodule() translates (possibly incomplete) file or module name
+        into an absolute file name.
+        """
+        if os.path.isabs(filename) and  os.path.exists(filename):
+            return filename
+        f = os.path.join(sys.path[0], filename)
+        if  os.path.exists(f) and self.canonic(f) == self.mainpyfile:
+            return f
+        root, ext = os.path.splitext(filename)
+        origFileName = filename
+        if ext == '':
+            filename = filename + '.py'
+        if os.path.isabs(filename):
+            return filename
+        for dirname in sys.path:
+            while os.path.islink(dirname):
+                dirname = os.path.realpath(os.path.join(os.path.dirname(dirname), os.readlink(dirname)))
+            fullname = os.path.join(dirname, filename)
+            print 'checking %s' % fullname
+            if os.path.exists(fullname):
+                return fullname
+        if origFileName in sys.modules:
+            return sys.modules[origFileName].__file__
+        return None
+
+
 
     def default(self, line):
         if line[0] == '!': line = line[1:]
@@ -542,8 +567,11 @@ class Epdb(pdb.Pdb):
         if displayedItem:
             print
 
+    def do_define(self, arg):
+        self._eval(arg, self._define)
+
     def do_showdata(self, arg):
-        result = self._eval(item, self._showdata)
+        result = self._eval(arg, self._showdata)
 
     def _define(self, obj):
         if inspect.isclass(obj):
@@ -584,55 +612,6 @@ class Epdb(pdb.Pdb):
         else:
             print type(obj)
 
-
-    def do_define(self, arg):
-        self._eval(arg, self._define)
-
-    def do_showdata(self, arg):
-        result = self._eval(arg, self._showdata)
-
-    def _define(self, obj):
-        if inspect.isclass(obj):
-            bases = inspect.getmro(obj)
-            bases = [ x.__name__ for x in bases[1:] ]
-            if bases:
-                bases = ' -- Bases (' + ', '.join(bases) + ')'
-            else:
-                bases = '' 
-            if hasattr(obj, '__init__') and inspect.isroutine(obj.__init__):
-                try:
-                    initfn = obj.__init__.im_func
-                    argspec = inspect.getargspec(initfn)
-                    # get rid of self from arg list...
-                    fnargs = argspec[0][1:] 
-                    newArgSpec = (fnargs, argspec[1], argspec[2], argspec[3])
-                    argspec = inspect.formatargspec(*newArgSpec)
-                except TypeError:
-                    argspec = '(?)'
-            else:
-                argspec = ''
-            print "Class " + obj.__name__ + argspec + bases
-        elif inspect.ismethod(obj) or type(obj).__name__ == 'method-wrapper':
-            m_class = obj.im_class
-            m_self = obj.im_self
-            m_func = obj.im_func
-            name = m_class.__name__ + '.' +  m_func.__name__
-            #if m_self:
-            #    name = "<Bound>"  + name
-            argspec = inspect.formatargspec(*inspect.getargspec(m_func))
-            print "%s%s" % (name, argspec)
-        elif type(obj).__name__ == 'builtin_function_or_method':
-            print obj
-        elif inspect.isfunction(obj):
-            name = obj.__name__
-            argspec = inspect.formatargspec(*inspect.getargspec(obj))
-            print "%s%s" % (name, argspec)
-        else:
-            print type(obj)
-
-
-    def do_define(self, arg):
-        self._eval(arg, self._define)
 
     def do_doc(self, arg):
         self._eval(arg, self._doc)

From dbc@rpath.com Mon May  1 00:06:38 2006
Received: from ms-smtp-02.southeast.rr.com (ms-smtp-02.southeast.rr.com
	[24.25.9.101])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k4146clD030633
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:06:38 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k4145vk1027353
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:05:57 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k4145uvN007883
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:05:56 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k4145uM4007863
	for epdb-commits@lists.rpath.com; Mon, 1 May 2006 00:05:56 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200605010405.k4145uM4007863@lambchop.rdu.rpath.com>
Date: Mon, 01 May 2006 00:05:56 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: add news entries for latest fixes
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 01 May 2006 04:06:38 -0000

user:        David Christian <http://bugs.rpath.com>
files:       NEWS

add news entries for latest fixes

diff -r 020b6689e126 -r bf554b87cc56 NEWS
--- a/NEWS	Mon May  1 00:11:30 2006 -0400
+++ b/NEWS	Mon May  1 00:12:52 2006 -0400
@@ -1,3 +1,6 @@ Changes in 0.9:
+Changes in 0.9.1:
+    * until now works with filenames
+    * breakpoints/etc that take filenames will also now take sys.module entries, e.g. foo.bar, if sys.modules['foo.bar'] exists.
 Changes in 0.9: 
     * readline history should be much more well behaved
     * multiline entries will be stored as one entry

From dbc@rpath.com Mon May  1 00:06:39 2006
Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com
	[24.25.9.102])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k4146cho030636
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:06:38 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k4145ves013277
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:05:58 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.6) with ESMTP id k4145vaW007916
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 1 May 2006 00:05:57 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k4145v6j007906
	for epdb-commits@lists.rpath.com; Mon, 1 May 2006 00:05:57 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200605010405.k4145v6j007906@lambchop.rdu.rpath.com>
Date: Mon, 01 May 2006 00:05:57 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: remove debugging print
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 01 May 2006 04:06:39 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

remove debugging print

diff -r bf554b87cc56 -r 077f56d181cf epdb/epdb.py
--- a/epdb/epdb.py	Mon May  1 00:12:52 2006 -0400
+++ b/epdb/epdb.py	Mon May  1 00:13:06 2006 -0400
@@ -297,7 +297,6 @@ class Epdb(pdb.Pdb):
             while os.path.islink(dirname):
                 dirname = os.path.realpath(os.path.join(os.path.dirname(dirname), os.readlink(dirname)))
             fullname = os.path.join(dirname, filename)
-            print 'checking %s' % fullname
             if os.path.exists(fullname):
                 return fullname
         if origFileName in sys.modules:

From dbc@rpath.com Sat Jun 17 13:09:08 2006
Received: from ms-smtp-02.southeast.rr.com (ms-smtp-02.southeast.rr.com
	[24.25.9.101])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k5HH97wc021028
	for <epdb-commits@lists.rpath.com>; Sat, 17 Jun 2006 13:09:08 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k5HH899x005072 for <epdb-commits@lists.rpath.com>;
	Sat, 17 Jun 2006 13:08:09 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k5HH88vV029852
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Sat, 17 Jun 2006 13:08:08 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k5HH88PX029839
	for epdb-commits@lists.rpath.com; Sat, 17 Jun 2006 13:08:08 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200606171708.k5HH88PX029839@lambchop.rdu.rpath.com>
Date: Sat, 17 Jun 2006 13:08:08 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: Make epdb play nicely with programs not in the main process
	group.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 17 Jun 2006 17:09:08 -0000

user:        David Christian <http://bugs.rpath.com>
files:       NEWS epdb/epdb.py

Make epdb play nicely with programs not in the main process group.

diff -r 5281331f6497 -r 983acfaa1faa NEWS
--- a/NEWS	Mon Apr  3 01:29:53 2006 -0400
+++ b/NEWS	Sat Jun 17 13:06:22 2006 -0400
@@ -1,3 +1,7 @@ Changes in 0.9:
+Changes in @NEW@:
+    * epdb will automatically switch to the process group with session control,
+      so that in programs where setpgrp() has been called, such processes 
+      can still be debugged.
 Changes in 0.9: 
     * readline history should be much more well behaved
     * multiline entries will be stored as one entry
diff -r 5281331f6497 -r 983acfaa1faa epdb/epdb.py
--- a/epdb/epdb.py	Mon Apr  3 01:29:53 2006 -0400
+++ b/epdb/epdb.py	Sat Jun 17 13:06:22 2006 -0400
@@ -42,6 +42,7 @@ class Epdb(pdb.Pdb):
     # and restore stdout when done
     __old_stdin  = None
     __old_stdout = None
+    __old_pgid = None
     _displayList = {}
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
@@ -693,6 +694,7 @@ class Epdb(pdb.Pdb):
     def switch_input_output(self):
         self.switch_stdout()
         self.switch_stdin()
+        self.switch_pgid()
 
     def restore_input_output(self):
         if not self.__old_stdout is None:
@@ -701,6 +703,15 @@ class Epdb(pdb.Pdb):
             sys.stdout = self.__old_stdout
         if not self.__old_stdin is None:
             sys.stdin = self.__old_stdin
+        if self.__old_pgid is not None:
+	    os.setpgid(0, self.__old_pgid)
+
+    def switch_pgid(self):
+	if os.getpgrp() != os.tcgetpgrp(0):
+	    self.__old_pgid = os.getpgrp()
+            os.setpgid(0, os.tcgetpgrp(0))
+        else:
+            self.__old_stdout = None
 
     def switch_stdout(self):
         isatty = False

From dbc@rpath.com Sat Jun 17 13:09:08 2006
Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com
	[24.25.9.102])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k5HH98pi021031
	for <epdb-commits@lists.rpath.com>; Sat, 17 Jun 2006 13:09:08 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k5HH89kx020447 for <epdb-commits@lists.rpath.com>;
	Sat, 17 Jun 2006 13:08:10 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k5HH89lg029897
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Sat, 17 Jun 2006 13:08:09 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k5HH89mg029868
	for epdb-commits@lists.rpath.com; Sat, 17 Jun 2006 13:08:09 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200606171708.k5HH89mg029868@lambchop.rdu.rpath.com>
Date: Sat, 17 Jun 2006 13:08:09 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 17 Jun 2006 17:09:08 -0000

user:        David Christian <http://bugs.rpath.com>
files:       NEWS

branch merge

diff -r 983acfaa1faa -r 2021cd517b34 NEWS
--- a/NEWS	Sat Jun 17 13:06:22 2006 -0400
+++ b/NEWS	Sat Jun 17 13:07:53 2006 -0400
@@ -2,6 +2,9 @@ Changes in @NEW@:
     * epdb will automatically switch to the process group with session control,
       so that in programs where setpgrp() has been called, such processes 
       can still be debugged.
+Changes in 0.9.1:
+    * until now works with filenames
+    * breakpoints/etc that take filenames will also now take sys.module entries, e.g. foo.bar, if sys.modules['foo.bar'] exists.
 Changes in 0.9: 
     * readline history should be much more well behaved
     * multiline entries will be stored as one entry

From dbc@rpath.com Sat Jun 17 13:09:09 2006
Received: from ms-smtp-01.southeast.rr.com (ms-smtp-01.southeast.rr.com
	[24.25.9.100])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k5HH98B4021033
	for <epdb-commits@lists.rpath.com>; Sat, 17 Jun 2006 13:09:08 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k5HH8AYK000610 for <epdb-commits@lists.rpath.com>;
	Sat, 17 Jun 2006 13:08:10 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k5HH89qx029915
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Sat, 17 Jun 2006 13:08:09 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k5HH898P029910
	for epdb-commits@lists.rpath.com; Sat, 17 Jun 2006 13:08:09 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200606171708.k5HH898P029910@lambchop.rdu.rpath.com>
Date: Sat, 17 Jun 2006 13:08:09 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 17 Jun 2006 17:09:09 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

branch merge

diff -r 2021cd517b34 -r 7db96a9a4328 epdb/epdb.py
--- a/epdb/epdb.py	Sat Jun 17 13:07:53 2006 -0400
+++ b/epdb/epdb.py	Sat Jun 17 13:08:27 2006 -0400
@@ -178,14 +178,9 @@ class Epdb(pdb.Pdb):
     do_f = do_file
 
     def do_until(self, arg):
-        try:
-            int(arg)
-        except ValueError:
-            print "Error: only specify line numbers for until"
-            return 0
-        filename = self.canonic(self.curframe.f_code.co_filename)
-        if self.checkline(filename, int(arg)):
-            self.do_tbreak(arg)
+        numBreaks = len(self.breaks)
+        self.do_tbreak(arg)
+        if len(self.breaks) > numBreaks:
             self.set_continue()
             return 1
         else:
@@ -281,6 +276,35 @@ class Epdb(pdb.Pdb):
             pdb.Pdb.do_list(self, arg)
 
     do_l = do_list
+
+    def lookupmodule(self, filename):
+        """Helper function for break/clear parsing -- may be overridden.
+
+        lookupmodule() translates (possibly incomplete) file or module name
+        into an absolute file name.
+        """
+        if os.path.isabs(filename) and  os.path.exists(filename):
+            return filename
+        f = os.path.join(sys.path[0], filename)
+        if  os.path.exists(f) and self.canonic(f) == self.mainpyfile:
+            return f
+        root, ext = os.path.splitext(filename)
+        origFileName = filename
+        if ext == '':
+            filename = filename + '.py'
+        if os.path.isabs(filename):
+            return filename
+        for dirname in sys.path:
+            while os.path.islink(dirname):
+                dirname = os.path.realpath(os.path.join(os.path.dirname(dirname), os.readlink(dirname)))
+            fullname = os.path.join(dirname, filename)
+            if os.path.exists(fullname):
+                return fullname
+        if origFileName in sys.modules:
+            return sys.modules[origFileName].__file__
+        return None
+
+
 
     def default(self, line):
         if line[0] == '!': line = line[1:]
@@ -543,8 +567,11 @@ class Epdb(pdb.Pdb):
         if displayedItem:
             print
 
+    def do_define(self, arg):
+        self._eval(arg, self._define)
+
     def do_showdata(self, arg):
-        result = self._eval(item, self._showdata)
+        result = self._eval(arg, self._showdata)
 
     def _define(self, obj):
         if inspect.isclass(obj):
@@ -585,55 +612,6 @@ class Epdb(pdb.Pdb):
         else:
             print type(obj)
 
-
-    def do_define(self, arg):
-        self._eval(arg, self._define)
-
-    def do_showdata(self, arg):
-        result = self._eval(arg, self._showdata)
-
-    def _define(self, obj):
-        if inspect.isclass(obj):
-            bases = inspect.getmro(obj)
-            bases = [ x.__name__ for x in bases[1:] ]
-            if bases:
-                bases = ' -- Bases (' + ', '.join(bases) + ')'
-            else:
-                bases = '' 
-            if hasattr(obj, '__init__') and inspect.isroutine(obj.__init__):
-                try:
-                    initfn = obj.__init__.im_func
-                    argspec = inspect.getargspec(initfn)
-                    # get rid of self from arg list...
-                    fnargs = argspec[0][1:] 
-                    newArgSpec = (fnargs, argspec[1], argspec[2], argspec[3])
-                    argspec = inspect.formatargspec(*newArgSpec)
-                except TypeError:
-                    argspec = '(?)'
-            else:
-                argspec = ''
-            print "Class " + obj.__name__ + argspec + bases
-        elif inspect.ismethod(obj) or type(obj).__name__ == 'method-wrapper':
-            m_class = obj.im_class
-            m_self = obj.im_self
-            m_func = obj.im_func
-            name = m_class.__name__ + '.' +  m_func.__name__
-            #if m_self:
-            #    name = "<Bound>"  + name
-            argspec = inspect.formatargspec(*inspect.getargspec(m_func))
-            print "%s%s" % (name, argspec)
-        elif type(obj).__name__ == 'builtin_function_or_method':
-            print obj
-        elif inspect.isfunction(obj):
-            name = obj.__name__
-            argspec = inspect.formatargspec(*inspect.getargspec(obj))
-            print "%s%s" % (name, argspec)
-        else:
-            print type(obj)
-
-
-    def do_define(self, arg):
-        self._eval(arg, self._define)
 
     def do_doc(self, arg):
         self._eval(arg, self._doc)

From dbc@rpath.com Fri Jun 23 14:11:51 2006
Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com
	[24.25.9.102])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k5NIBpcH027425
	for <epdb-commits@lists.rpath.com>; Fri, 23 Jun 2006 14:11:51 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k5NIAoGs024949 for <epdb-commits@lists.rpath.com>;
	Fri, 23 Jun 2006 14:10:50 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k5NIAnSf014941
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 23 Jun 2006 14:10:49 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k5NIAnYc014920
	for epdb-commits@lists.rpath.com; Fri, 23 Jun 2006 14:10:49 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200606231810.k5NIAnYc014920@lambchop.rdu.rpath.com>
Date: Fri, 23 Jun 2006 14:10:49 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: Added tag epdb-0.9.1 for changeset
	7db96a9a43280660dbf061318de7bfc724ca4da8
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 23 Jun 2006 18:11:51 -0000

user:        David Christian <http://bugs.rpath.com>
files:       .hgtags

Added tag epdb-0.9.1 for changeset 7db96a9a43280660dbf061318de7bfc724ca4da8

diff -r 077f56d181cf -r 445864a71d88 .hgtags
--- a/.hgtags	Mon May  1 00:13:06 2006 -0400
+++ b/.hgtags	Fri Jun 23 14:10:41 2006 -0400
@@ -1,2 +1,3 @@ 335496a445463456a39098764c45973149e08a7c
 335496a445463456a39098764c45973149e08a7c epdb-0.8
 e57708f1b52d4c1b152f47027985d6b3c0da81a5 epdb-0.8
+7db96a9a43280660dbf061318de7bfc724ca4da8 epdb-0.9.1

From dbc@rpath.com Fri Jun 23 14:11:52 2006
Received: from ms-smtp-01.southeast.rr.com (ms-smtp-01.southeast.rr.com
	[24.25.9.100])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k5NIBpYF027428
	for <epdb-commits@lists.rpath.com>; Fri, 23 Jun 2006 14:11:51 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k5NIAovV025477 for <epdb-commits@lists.rpath.com>;
	Fri, 23 Jun 2006 14:10:50 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k5NIAo3n014979
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 23 Jun 2006 14:10:50 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k5NIAnvm014966
	for epdb-commits@lists.rpath.com; Fri, 23 Jun 2006 14:10:49 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200606231810.k5NIAnvm014966@lambchop.rdu.rpath.com>
Date: Fri, 23 Jun 2006 14:10:49 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 23 Jun 2006 18:11:52 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

branch merge

diff -r 445864a71d88 -r 9a8a280d06c5 epdb/epdb.py
--- a/epdb/epdb.py	Fri Jun 23 14:10:41 2006 -0400
+++ b/epdb/epdb.py	Fri Jun 23 14:11:11 2006 -0400
@@ -42,6 +42,7 @@ class Epdb(pdb.Pdb):
     # and restore stdout when done
     __old_stdin  = None
     __old_stdout = None
+    __old_pgid = None
     _displayList = {}
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
@@ -671,6 +672,7 @@ class Epdb(pdb.Pdb):
     def switch_input_output(self):
         self.switch_stdout()
         self.switch_stdin()
+        self.switch_pgid()
 
     def restore_input_output(self):
         if not self.__old_stdout is None:
@@ -679,6 +681,15 @@ class Epdb(pdb.Pdb):
             sys.stdout = self.__old_stdout
         if not self.__old_stdin is None:
             sys.stdin = self.__old_stdin
+        if self.__old_pgid is not None:
+	    os.setpgid(0, self.__old_pgid)
+
+    def switch_pgid(self):
+	if os.getpgrp() != os.tcgetpgrp(0):
+	    self.__old_pgid = os.getpgrp()
+            os.setpgid(0, os.tcgetpgrp(0))
+        else:
+            self.__old_stdout = None
 
     def switch_stdout(self):
         isatty = False

From dbc@rpath.com Wed Jul  5 11:28:28 2006
Received: from ms-smtp-04.southeast.rr.com (ms-smtp-04.southeast.rr.com
	[24.25.9.103])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k65FSSBF032381
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:28:28 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-04.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k65FRMTn018328
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:23 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k65FRMUj005873
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:22 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k65FRMKE005860
	for epdb-commits@lists.rpath.com; Wed, 5 Jul 2006 11:27:22 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200607051527.k65FRMKE005860@lambchop.rdu.rpath.com>
Date: Wed, 05 Jul 2006 11:27:22 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: sometimes setpgrp won't work
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 05 Jul 2006 15:28:29 -0000

user:        David Christian <http://bugs.rpath.com>
files:       epdb/epdb.py

sometimes setpgrp won't work

diff -r 7db96a9a4328 -r d30ced545445 epdb/epdb.py
--- a/epdb/epdb.py	Sat Jun 17 13:08:27 2006 -0400
+++ b/epdb/epdb.py	Wed Jul  5 11:26:54 2006 -0400
@@ -685,11 +685,14 @@ class Epdb(pdb.Pdb):
 	    os.setpgid(0, self.__old_pgid)
 
     def switch_pgid(self):
-	if os.getpgrp() != os.tcgetpgrp(0):
-	    self.__old_pgid = os.getpgrp()
-            os.setpgid(0, os.tcgetpgrp(0))
-        else:
-            self.__old_stdout = None
+        try:
+            if os.getpgrp() != os.tcgetpgrp(0):
+                self.__old_pgid = os.getpgrp()
+                os.setpgid(0, os.tcgetpgrp(0))
+            else:
+                self.__old_pgid = None
+        except OSError:
+            self.__old_pgid = None
 
     def switch_stdout(self):
         isatty = False

From dbc@rpath.com Wed Jul  5 11:28:29 2006
Received: from ms-smtp-02.southeast.rr.com (ms-smtp-02.southeast.rr.com
	[24.25.9.101])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k65FSScK032382
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:28:29 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-02.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k65FRNMQ014891
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:23 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k65FRMdu005912
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:22 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k65FRM3I005889
	for epdb-commits@lists.rpath.com; Wed, 5 Jul 2006 11:27:22 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200607051527.k65FRM3I005889@lambchop.rdu.rpath.com>
Date: Wed, 05 Jul 2006 11:27:22 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.9.1.1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 05 Jul 2006 15:28:29 -0000

tag:         epdb-0.9.1.1
user:        David Christian <http://bugs.rpath.com>
files:       Makefile

0.9.1.1

diff -r d30ced545445 -r bfad1eba4add Makefile
--- a/Makefile	Wed Jul  5 11:26:54 2006 -0400
+++ b/Makefile	Wed Jul  5 11:27:07 2006 -0400
@@ -1,4 +1,4 @@ export VERSION = 0.9
-export VERSION = 0.9
+export VERSION = 0.9.1.1
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/

From dbc@rpath.com Wed Jul  5 11:28:30 2006
Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com
	[24.25.9.102])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k65FSTtj032387
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:28:29 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-03.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k65FROIu021308
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:24 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k65FRNwZ005967
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:23 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k65FRNMw005933
	for epdb-commits@lists.rpath.com; Wed, 5 Jul 2006 11:27:23 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200607051527.k65FRNMw005933@lambchop.rdu.rpath.com>
Date: Wed, 05 Jul 2006 11:27:23 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: Added tag epdb-0.9.1.1 for changeset
	bfad1eba4add3bc4791ec6b02505f7a5ec529459
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 05 Jul 2006 15:28:30 -0000

user:        David Christian <http://bugs.rpath.com>
files:       .hgtags

Added tag epdb-0.9.1.1 for changeset bfad1eba4add3bc4791ec6b02505f7a5ec529459

diff -r bfad1eba4add -r 2c6d1e012199 .hgtags
--- a/.hgtags	Wed Jul  5 11:27:07 2006 -0400
+++ b/.hgtags	Wed Jul  5 11:27:11 2006 -0400
@@ -1,2 +1,3 @@ 335496a445463456a39098764c45973149e08a7c
 335496a445463456a39098764c45973149e08a7c epdb-0.8
 e57708f1b52d4c1b152f47027985d6b3c0da81a5 epdb-0.8
+bfad1eba4add3bc4791ec6b02505f7a5ec529459 epdb-0.9.1.1

From dbc@rpath.com Wed Jul  5 11:28:31 2006
Received: from ms-smtp-01.southeast.rr.com (ms-smtp-01.southeast.rr.com
	[24.25.9.100])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k65FSV2N032398
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:28:31 -0400
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [24.172.59.42])
	by ms-smtp-01.southeast.rr.com (8.13.6/8.13.6) with ESMTP id
	k65FROoN001477
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:25 -0400 (EDT)
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k65FRNot005976
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Wed, 5 Jul 2006 11:27:24 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k65FRNne005968
	for epdb-commits@lists.rpath.com; Wed, 5 Jul 2006 11:27:23 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200607051527.k65FRNne005968@lambchop.rdu.rpath.com>
Date: Wed, 05 Jul 2006 11:27:23 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 05 Jul 2006 15:28:31 -0000

tag:         tip
user:        David Christian <http://bugs.rpath.com>
files:       .hgtags epdb/epdb.py

branch merge

diff -r 2c6d1e012199 -r 28de4e7ae8bb .hgtags
--- a/.hgtags	Wed Jul  5 11:27:11 2006 -0400
+++ b/.hgtags	Wed Jul  5 11:27:55 2006 -0400
@@ -1,3 +1,4 @@ 335496a445463456a39098764c45973149e08a7c
 335496a445463456a39098764c45973149e08a7c epdb-0.8
 e57708f1b52d4c1b152f47027985d6b3c0da81a5 epdb-0.8
+7db96a9a43280660dbf061318de7bfc724ca4da8 epdb-0.9.1
 bfad1eba4add3bc4791ec6b02505f7a5ec529459 epdb-0.9.1.1

From dbc@rpath.com Fri Sep 29 14:02:54 2006
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k8TI2rmW007739
	for <epdb-commits@lists.rpath.com>; Fri, 29 Sep 2006 14:02:53 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k8TI1Dec013395
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 29 Sep 2006 14:01:13 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k8TI1Cuh013391
	for epdb-commits@lists.rpath.com; Fri, 29 Sep 2006 14:01:12 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200609291801.k8TI1Cuh013391@lambchop.rdu.rpath.com>
Date: Fri, 29 Sep 2006 14:01:12 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.9.1.1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 29 Sep 2006 18:02:54 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       NEWS

0.9.1.1

diff -r 28de4e7ae8bb -r 565e334a03fb NEWS
--- a/NEWS	Wed Jul 05 11:27:55 2006 -0400
+++ b/NEWS	Fri Sep 29 14:00:49 2006 -0400
@@ -1,4 +1,4 @@ Changes in @NEW@:
-Changes in @NEW@:
+Changes in 0.9.1.1:
     * epdb will automatically switch to the process group with session control,
       so that in programs where setpgrp() has been called, such processes 
       can still be debugged.

From dbc@rpath.com Tue Oct  3 14:34:17 2006
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k93IYHjR032406
	for <epdb-commits@lists.rpath.com>; Tue, 3 Oct 2006 14:34:17 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k93IWZU7008964
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 3 Oct 2006 14:32:35 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k93IWZP5008944
	for epdb-commits@lists.rpath.com; Tue, 3 Oct 2006 14:32:35 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200610031832.k93IWZP5008944@lambchop.rdu.rpath.com>
Date: Tue, 03 Oct 2006 14:32:35 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: let's not get crazy with the version numbers
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2006 18:34:17 -0000

tag:         epdb-0.9.2
user:        David Christian <http://issues.rpath.com>
files:       Makefile NEWS

let's not get crazy with the version numbers

diff -r 565e334a03fb -r 5ed3d710e4c0 Makefile
--- a/Makefile	Fri Sep 29 14:00:49 2006 -0400
+++ b/Makefile	Tue Oct 03 14:32:14 2006 -0400
@@ -1,4 +1,4 @@ export VERSION = 0.9.1.1
-export VERSION = 0.9.1.1
+export VERSION = 0.9.2
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
diff -r 565e334a03fb -r 5ed3d710e4c0 NEWS
--- a/NEWS	Fri Sep 29 14:00:49 2006 -0400
+++ b/NEWS	Tue Oct 03 14:32:14 2006 -0400
@@ -1,4 +1,4 @@ Changes in 0.9.1.1:
-Changes in 0.9.1.1:
+Changes in 0.9.2:
     * epdb will automatically switch to the process group with session control,
       so that in programs where setpgrp() has been called, such processes 
       can still be debugged.

From dbc@rpath.com Tue Oct  3 14:34:18 2006
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k93IYHpr032409
	for <epdb-commits@lists.rpath.com>; Tue, 3 Oct 2006 14:34:18 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k93IWaiS008987
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 3 Oct 2006 14:32:36 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k93IWZiL008976
	for epdb-commits@lists.rpath.com; Tue, 3 Oct 2006 14:32:36 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200610031832.k93IWZiL008976@lambchop.rdu.rpath.com>
Date: Tue, 03 Oct 2006 14:32:35 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: Added tag epdb-0.9.2 for changeset
	5ed3d710e4c096fd6c0269c14517a8321dff56bf
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2006 18:34:18 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       .hgtags

Added tag epdb-0.9.2 for changeset 5ed3d710e4c096fd6c0269c14517a8321dff56bf

diff -r 5ed3d710e4c0 -r 9abeb17aabbe .hgtags
--- a/.hgtags	Tue Oct 03 14:32:14 2006 -0400
+++ b/.hgtags	Tue Oct 03 14:32:21 2006 -0400
@@ -2,3 +2,4 @@ e57708f1b52d4c1b152f47027985d6b3c0da81a5
 e57708f1b52d4c1b152f47027985d6b3c0da81a5 epdb-0.8
 7db96a9a43280660dbf061318de7bfc724ca4da8 epdb-0.9.1
 bfad1eba4add3bc4791ec6b02505f7a5ec529459 epdb-0.9.1.1
+5ed3d710e4c096fd6c0269c14517a8321dff56bf epdb-0.9.2

From dbc@rpath.com Thu Oct  5 07:52:13 2006
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k95BqDDJ010718
	for <epdb-commits@lists.rpath.com>; Thu, 5 Oct 2006 07:52:13 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k95BoUqY019523
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Thu, 5 Oct 2006 07:50:31 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k95BoU8o019517
	for epdb-commits@lists.rpath.com; Thu, 5 Oct 2006 07:50:30 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200610051150.k95BoU8o019517@lambchop.rdu.rpath.com>
Date: Thu, 05 Oct 2006 07:50:30 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.9.1.1 was actually released to the world.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 05 Oct 2006 11:52:13 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       Makefile NEWS

0.9.1.1 was actually released to the world.

diff -r 9abeb17aabbe -r 68e780b87f52 Makefile
--- a/Makefile	Tue Oct 03 14:32:21 2006 -0400
+++ b/Makefile	Thu Oct 05 07:50:14 2006 -0400
@@ -1,4 +1,4 @@ export VERSION = 0.9.2
-export VERSION = 0.9.2
+export VERSION = 0.9.1.1
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
diff -r 9abeb17aabbe -r 68e780b87f52 NEWS
--- a/NEWS	Tue Oct 03 14:32:21 2006 -0400
+++ b/NEWS	Thu Oct 05 07:50:14 2006 -0400
@@ -1,4 +1,4 @@ Changes in 0.9.2:
-Changes in 0.9.2:
+Changes in 0.9.1.1:
     * epdb will automatically switch to the process group with session control,
       so that in programs where setpgrp() has been called, such processes 
       can still be debugged.

From dbc@rpath.com Thu Oct  5 07:52:30 2006
Received: from lambchop.rdu.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id k95BqUlk010726
	for <epdb-commits@lists.rpath.com>; Thu, 5 Oct 2006 07:52:30 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by lambchop.rdu.rpath.com (8.13.6/8.13.4) with ESMTP id k95BomAw019641
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Thu, 5 Oct 2006 07:50:48 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id k95BomdD019637
	for epdb-commits@lists.rpath.com; Thu, 5 Oct 2006 07:50:48 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200610051150.k95BomdD019637@lambchop.rdu.rpath.com>
Date: Thu, 05 Oct 2006 07:50:48 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: remove 0.9.2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 05 Oct 2006 11:52:31 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       .hgtags

remove 0.9.2

diff -r 68e780b87f52 -r d4065b9aaf2c .hgtags
--- a/.hgtags	Thu Oct 05 07:50:14 2006 -0400
+++ b/.hgtags	Thu Oct 05 07:50:33 2006 -0400
@@ -2,4 +2,3 @@ e57708f1b52d4c1b152f47027985d6b3c0da81a5
 e57708f1b52d4c1b152f47027985d6b3c0da81a5 epdb-0.8
 7db96a9a43280660dbf061318de7bfc724ca4da8 epdb-0.9.1
 bfad1eba4add3bc4791ec6b02505f7a5ec529459 epdb-0.9.1.1
-5ed3d710e4c096fd6c0269c14517a8321dff56bf epdb-0.9.2

From dbc@rpath.com Wed Apr 18 18:27:52 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id l3IMRqR2016405
	for <epdb-commits@lists.rpath.com>; Wed, 18 Apr 2007 18:27:52 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id l3IMOh9T016216
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Wed, 18 Apr 2007 18:24:43 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id l3IMOh5R016212
	for epdb-commits@lists.rpath.com; Wed, 18 Apr 2007 18:24:43 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200704182224.l3IMOh5R016212@lambchop.rdu.rpath.com>
Date: Wed, 18 Apr 2007 18:24:43 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: add telnetserver + telnet client
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 18 Apr 2007 22:27:52 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       epdb/epdb.py epdb/telnetclient.py epdb/telnetserver.py

add telnetserver + telnet client

diff -r d4065b9aaf2c -r de3c89d2fecf epdb/epdb.py
--- a/epdb/epdb.py	Thu Oct 05 07:50:33 2006 -0400
+++ b/epdb/epdb.py	Wed Apr 18 18:27:04 2007 -0400
@@ -1,3 +1,4 @@
+#!/usr/bin/python2.4
 #
 # Copyright (c) 2004-2005 rPath, Inc.
 #
@@ -24,11 +25,20 @@ except ImportError:
     hasReadline = False
 else:
     hasReadline = True
+import signal
 import socket
 import string
 import sys
 import tempfile
 import traceback
+
+try:
+    sys.path.append('/home/dbc/rpl/hg/telnet')
+    import telnetserver
+    import telnetclient
+    hasTelnet = True
+except ImportError:
+    hasTelnet = False
 
 from pdb import _saferepr
 
@@ -47,8 +57,8 @@ class Epdb(pdb.Pdb):
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
 
-
     def __init__(self):
+        self._server = None
         self._exc_type = None
         self._exc_msg = None
         self._tb = None
@@ -98,6 +108,38 @@ class Epdb(pdb.Pdb):
                 self.restore_old_history()
             else:
                 readline.clear_history()
+
+    if hasTelnet:
+        # telnet server support.
+        # if enabled, you can serve a epdb session.
+        def serve(self, port=8080):
+            print 'Serving on port %s' % port
+            self._server = telnetserver.InvertedTelnetServer(('', port))
+            self._server.handle_request()
+            self.set_trace(skip=2)
+
+        def serve_post_mortem(self, t, exc_type=None, exc_msg=None, port=8080):
+            print 'Serving on port %s' % port
+            self._server = telnetserver.InvertedTelnetServer(('', port))
+            self._server.handle_request()
+            self.post_mortem(t, exc_type, exc_msg, port)
+
+        def do_detach(self, arg):
+            if self.server:
+                print ('Leaving process in debug state - use "close" to'
+                       ' stop debug session')
+                self._server.close_request()
+                self._server.handle_request()
+            else:
+                print "Not attached via telnet"
+
+        def do_close(self, arg):
+            if self.server:
+                print 'Ending epdb session - use "detach" to stop serving'
+                self._server.close_request()
+                return True
+            else:
+                print "Not attached via telnet"
 
     def do_savestack(self, path):
         if 'stack' in self.__dict__:
@@ -304,8 +346,6 @@ class Epdb(pdb.Pdb):
             return sys.modules[origFileName].__file__
         return None
 
-
-
     def default(self, line):
         if line[0] == '!': line = line[1:]
         if self.handle_directive(line):
@@ -327,7 +367,6 @@ class Epdb(pdb.Pdb):
             return pdb.Pdb.default(self, origLine)
         finally:
             self.read_history()
-            
 
     def multiline(self, firstline=''):
         full_input = []
@@ -669,17 +708,26 @@ class Epdb(pdb.Pdb):
         self.save_history(restoreOldHistory=True)
         self.restore_input_output()
 
+    def post_mortem(self, t, exc_type, exc_msg):
+        p._exc_type = exc_type
+        p._exc_msg = exc_msg
+        p._tb = t
+        p.reset()
+        while t.tb_next is not None:
+            t = t.tb_next
+        p.interaction(t.tb_frame, t)
+
     def switch_input_output(self):
         self.switch_stdout()
         self.switch_stdin()
         self.switch_pgid()
 
     def restore_input_output(self):
-        if not self.__old_stdout is None:
+        if self.__old_stdout is not None:
             sys.stdout.flush()
             # now we reset stdout to be the whatever it was before
             sys.stdout = self.__old_stdout
-        if not self.__old_stdin is None:
+        if self.__old_stdin is not None:
             sys.stdin = self.__old_stdin
         if self.__old_pgid is not None:
 	    os.setpgid(0, self.__old_pgid)
@@ -903,15 +951,19 @@ def set_trace(marker='default'):
 
 st = set_trace
 
+if hasTelnet:
+    def serve(port=8080):
+        Epdb().serve(port)
+    
+    def serve_post_mortem(t, exc_type=None, exc_msg=None, port=8080):
+        Epdb().serve_post_mortem(t, exc_type, exc_msg, port)
+
+    def connect(host='localhost', port=8080):
+        t = telnetclient.TelnetClient(host, port)
+        t.interact()
+
 def post_mortem(t, exc_type=None, exc_msg=None):
-    p = Epdb()
-    p._exc_type = exc_type
-    p._exc_msg = exc_msg
-    p._tb = t
-    p.reset()
-    while t.tb_next is not None:
-        t = t.tb_next
-    p.interaction(t.tb_frame, t)
+    Epdb().post_mortem(t, exc_type=None, exc_msg=None)
 
 def matchFileOnDirPath(curpath, pathdir):
     """Find match for a file by slicing away its directory elements
@@ -985,3 +1037,26 @@ def _removeQuoteSet(line, quote1, quote2
         secondPoint += firstPoint
         line = line[:firstPoint] + line[(secondPoint+2*ln):]
 
+def main(argv):
+    if len(argv) == 1:
+        set_trace()
+        return
+    command = argv[1]
+    if command == 'connect':
+        if len(argv) > 2:
+            host = argv[2]
+        else:
+            host = 'localhost'
+        if len(argv) > 3:
+            port = int(argv[3])
+        else:
+            port = 8080
+        connect(host=host, port=port)
+    else:
+        print "usage: connect [host] [port]"
+        return 1
+    return 0
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
+
diff -r d4065b9aaf2c -r de3c89d2fecf epdb/telnetclient.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/epdb/telnetclient.py	Wed Apr 18 18:27:04 2007 -0400
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+import errno
+import fcntl
+import os
+import select
+import signal
+import struct
+import sys
+import telnetlib
+import termios
+
+from telnetlib import IAC, IP, SB, SE, NAWS
+
+def getTerminalSize():
+    s = struct.pack('HHHH', 0, 0, 0, 0)
+    result = fcntl.ioctl(sys.stdin.fileno(), termios.TIOCGWINSZ, s)
+    rows, cols = struct.unpack('HHHH', result)[0:2]
+    return rows, cols
+
+class TelnetClient(telnetlib.Telnet):
+    def __init__(self, *args, **kw):
+        telnetlib.Telnet.__init__(self, *args, **kw)
+        signal.signal(signal.SIGINT, self.ctrl_c)
+        signal.signal(signal.SIGWINCH, self.sigwinch)
+        self.oldTerm = None
+        self.oldFlags = None
+
+    def set_raw_mode(self):
+        fd = sys.stdin.fileno()
+        self.oldTerm = termios.tcgetattr(fd)
+        newattr = termios.tcgetattr(fd)
+        newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO
+        termios.tcsetattr(fd, termios.TCSANOW, newattr)
+        self.oldFlags = fcntl.fcntl(fd, fcntl.F_GETFL)
+        fcntl.fcntl(fd, fcntl.F_SETFL, self.oldFlags | os.O_NONBLOCK)
+
+    def restore_terminal(self):
+        fd = sys.stdin.fileno()
+        if self.oldTerm:
+            termios.tcsetattr(fd, termios.TCSAFLUSH, self.oldTerm)
+        if self.oldFlags:
+            fcntl.fcntl(fd, fcntl.F_SETFL, self.oldFlags)
+
+    def ctrl_c(self, int, tb):
+        self.sock.sendall(IAC + IP)
+
+    def sigwinch(self, int, tb):
+        self.updateTerminalSize()
+
+    def updateTerminalSize(self):
+        rows, cols = getTerminalSize()
+        self.sock.sendall(IAC + SB + NAWS + chr(cols) + chr(rows) + IAC + SE)
+
+    def interact(self):
+        self.set_raw_mode()
+        self.updateTerminalSize()
+        try:
+            while 1:
+                try:
+                    rfd, wfd, xfd = select.select([self, sys.stdin], [], [])
+                except select.error, err:
+                    if err.args[0] != errno.EINTR: # ignore interrupted select
+                        raise
+                if self in rfd:
+                    try:
+                        text = self.read_eager()
+                    except EOFError:
+                        print '*** Connection closed by remote host ***'
+                        break
+                    if text:
+                        sys.stdout.write(text)
+                        sys.stdout.flush()
+                if sys.stdin in rfd:
+                    line = sys.stdin.read(4096)
+                    if not line:
+                        break
+                    self.write(line)
+        finally:
+            self.restore_terminal()
+
+if __name__ == '__main__':
+    t = TelnetClient('localhost', 8000)
+    t.interact()
diff -r d4065b9aaf2c -r de3c89d2fecf epdb/telnetserver.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/epdb/telnetserver.py	Wed Apr 18 18:27:04 2007 -0400
@@ -0,0 +1,261 @@
+#!/usr/bin/python
+# Copyright (c) 2005-2006 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.opensource.org/licenses/cpl.php.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+Telnet Server implementation.
+
+Based on telnetlib telnet client - reads in and parses telnet protocol
+from the socket, understands window change requests and interrupt requests. 
+(IP and NAWS).
+
+This server does _NOT_ do LINEMODE, instead it is character based.  This means
+to talk to this server using the standard telnet client, you'll need to first
+type "CTRL-] mode char\n"
+"""
+from SocketServer import TCPServer, BaseRequestHandler
+import fcntl
+import os
+import pty
+import select
+import signal
+import socket
+import struct
+import sys
+import telnetlib
+import termios
+import tty
+from telnetlib import IAC, IP, SB, SE, DO, DONT, WILL, WONT, TM, LINEMODE, NAWS
+
+class TelnetServerProtocolHandler(telnetlib.Telnet):
+    """
+        Code that actually understands telnet protocol.
+        Accepts telnet-coded input from the socket and passes on that
+        information to local, which should be the master for a pty controlled
+        process.
+    """
+    def __init__(self, socket, local):
+        telnetlib.Telnet.__init__(self)
+        self.sock = socket
+        self.remote = self.sock.fileno()
+        self.local = local
+        self.set_option_negotiation_callback(self.process_IAC)
+
+    def process_IAC(self, sock, cmd, option):
+        """
+            Read in and parse IAC commands as passed by telnetlib.
+
+            SB/SE commands are stored in sbdataq, and passed in w/ a command
+            of SE.  
+        """
+        if cmd == DO:
+            if option == TM: # timing mark - send WILL into outgoing stream
+                os.write(self.remote, IAC + WILL + TM)
+            else:
+                pass
+        elif cmd == IP:
+            # interrupt process
+            os.write(self.local, chr(ord('C') & 0x1F))
+        elif cmd == SB:
+            pass
+        elif cmd == SE:
+            option = self.sbdataq[0]
+            if option == NAWS: # negotiate window size.
+                cols = ord(self.sbdataq[1])
+                rows = ord(self.sbdataq[2])
+                s = struct.pack('HHHH', rows, cols, 0, 0)
+                fcntl.ioctl(self.local, termios.TIOCSWINSZ, s)
+        elif cmd == DONT:
+            pass
+        else:
+            pass
+
+    def handle(self):
+        """
+            Performs endless processing of socket input/output, passing
+            cooked information onto the local process.
+        """
+        while True:
+            toRead = select.select([self.local, self.remote], [], [], 0.1)[0]
+            if self.local in toRead:
+                data = os.read(self.local, 4096)
+                self.sock.sendall(data)
+                continue
+            if self.remote in toRead or self.rawq:
+                buf = self.read_eager()
+                os.write(self.local, buf)
+                continue
+
+class TelnetRequestHandler(BaseRequestHandler):
+    """
+        Request handler that serves up a shell for users who connect.
+        Derive from this class to change the execute() method to change how
+        what command the request serves to the client.
+    """
+    command = '/bin/sh'
+    args = ['/bin/sh']
+
+    def setup(self):
+        pass
+
+    def handle(self):
+        """
+            Creates a child process that is fully controlled by this
+            request handler, and serves data to and from it via the 
+            protocol handler.
+        """
+        pid, fd = pty.fork()
+        if pid:
+            protocol = TelnetServerProtocolHandler(self.request, fd)
+            protocol.handle()
+        else:
+            self.execute()
+
+    def execute(self):
+        try:
+            os.execv(self.command, self.args)
+        finally:
+            os._exit(1)
+
+    def finish(self):
+        pass
+
+
+class TelnetServer(TCPServer):
+
+    allow_reuse_address = True
+
+    def __init__(self, server_address=None, 
+                 requestHandlerClass=TelnetRequestHandler):
+        if not server_address:
+            server_address = ('', 23)
+        TCPServer.__init__(self, server_address, requestHandlerClass)
+
+class TelnetServerForCommand(TelnetServer):
+    def __init__(self, server_address=None, 
+                 requestHandlerClass=TelnetRequestHandler, 
+                 command=['/bin/sh']):
+        class RequestHandler(requestHandlerClass):
+            pass
+        RequestHandler.command = command[0]
+        RequestHandler.args = command
+        TelnetServer.__init__(self, server_address, RequestHandler)
+
+class InvertedTelnetRequestHandler(TelnetRequestHandler):
+    def handle(self):
+        masterFd, slaveFd = pty.openpty()
+
+        signal.signal(signal.SIGTTOU, signal.SIG_IGN)
+        pid = os.fork()
+        if pid:
+            os.close(masterFd)
+            raise SocketConnected(slaveFd, pid)
+            # make parent process the pty slave - the opposite of
+            # pty.fork().  In this setup, the parent process continues
+            # to act normally, while the child process performs the
+            # logging.  This makes it simple to kill the logging process
+            # when we are done with it and restore the parent process to
+            # normal, unlogged operation.
+        else:
+            os.close(slaveFd)
+            try:
+                protocol = TelnetServerProtocolHandler(self.request, masterFd)
+                protocol.handle()
+            finally:
+                os._exit(1)
+
+class InvertedTelnetServer(TelnetServer):
+    """
+        Creates a telnet server that controls the stdin and stdout
+        of the current process, instead of serving a subprocess.
+
+        The telnet server can be closed at any time, and when it is
+        input and output for the current process will be restored.
+    """
+    def __init__(self, server_address=None,
+                 requestHandlerClass=InvertedTelnetRequestHandler):
+        TelnetServer.__init__(self, server_address, requestHandlerClass)
+        self.closed = True
+        self.oldStdin = self.oldStdout = self.oldStderr = None
+        self.oldTermios = None
+
+    def handle_request(self):
+        """
+            Handle one request - serve current process to one connection.
+
+            Use close_request() to disconnect this process.
+        """
+        try:
+            request, client_address = self.get_request()
+        except socket.error:
+            return
+        if self.verify_request(request, client_address):
+            try:
+                self.process_request(request, client_address)
+            except SocketConnected, err:
+                self._serve_process(err.slaveFd, err.serverPid)
+                return
+            except:
+                self.handle_error(request, client_address)
+                self.close_request(request)
+
+    def _serve_process(self, slaveFd, serverPid):
+        """
+            Serves a process by connecting its outputs/inputs to the pty
+            slaveFd.  serverPid is the process controlling the master fd
+            that passes that output over the socket.
+        """
+        self.serverPid = serverPid
+        if sys.stdin.isatty():
+            self.oldTermios = termios.tcgetattr(sys.stdin.fileno())
+        else:
+            self.oldTermios = None
+        self.oldStderr = os.dup(sys.stderr.fileno())
+        self.oldStdout = os.dup(sys.stdout.fileno())
+        self.oldStdin = os.dup(sys.stdin.fileno())
+        os.dup2(slaveFd, 0)
+        os.dup2(slaveFd, 1)
+        os.dup2(slaveFd, 2)
+        os.close(slaveFd)
+        self.closed = False
+
+    def close_request(self):
+        if self.closed:
+            pass
+        self.closed = True
+        # restore old terminal settings before quitting
+        os.dup2(self.oldStdin, 0)
+        os.dup2(self.oldStdout, 1)
+        os.dup2(self.oldStderr, 2)
+        if self.oldTermios is not None:
+            termios.tcsetattr(0, termios.TCSADRAIN, self.oldTermios)
+        os.close(self.oldStdin)
+        os.close(self.oldStdout)
+        os.close(self.oldStderr)
+        os.waitpid(self.serverPid, 0)
+
+class SocketConnected(Exception):
+    """
+        Control-Flow Exception raised when we have successfully connected 
+        a socket.
+
+        Used for IntertedTelnetServer
+    """
+    def __init__(self, slaveFd, serverPid):
+        self.slaveFd = slaveFd
+        self.serverPid = serverPid
+
+
+if __name__ == '__main__':
+    print 'serving on 8081....'
+    t = TelnetServer(('', 8081))
+    t.serve_forever()

From dbc@rpath.com Fri Sep 21 17:10:25 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id l8LLAPQR011203
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:10:25 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id l8LL66Dg020924
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:06:06 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id l8LL66YR020916
	for epdb-commits@lists.rpath.com; Fri, 21 Sep 2007 17:06:06 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200709212106.l8LL66YR020916@lambchop.rdu.rpath.com>
Date: Fri, 21 Sep 2007 17:06:06 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: remove dependence on telnet package, and work even if
	sys.stdin is not of type
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Sep 2007 21:10:25 -0000

user:        David Christian <http://issues.rpath.com>
files:       epdb/epdb.py

remove dependence on telnet package, and work even if sys.stdin is not of type
file

diff -r de3c89d2fecf -r 89faa3da8337 epdb/epdb.py
--- a/epdb/epdb.py	Wed Apr 18 18:27:04 2007 -0400
+++ b/epdb/epdb.py	Fri Sep 21 15:23:23 2007 -0400
@@ -33,7 +33,6 @@ import traceback
 import traceback
 
 try:
-    sys.path.append('/home/dbc/rpl/hg/telnet')
     import telnetserver
     import telnetclient
     hasTelnet = True
@@ -746,7 +745,7 @@ class Epdb(pdb.Pdb):
         isatty = False
         try:
             fileno = sys.stdout.fileno()
-            isatty = os.isatty(fileno)
+            isatty = isinstance(sys.stdout, file) and os.isatty(fileno)
         except AttributeError:
             pass
             # sys.stdout is not a regular file,
@@ -767,7 +766,7 @@ class Epdb(pdb.Pdb):
         isatty = False
         try:
             fileno = sys.stdin.fileno()
-            isatty = os.isatty(fileno)
+            isatty = isinstance(sys.stdout, file) and os.isatty(fileno)
         except AttributeError:
             pass
             # sys.stdout is not a regular file,

From dbc@rpath.com Fri Sep 21 17:10:27 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id l8LLAR6T011211
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:10:27 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id l8LL69nF020960
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:06:09 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id l8LL68Ra020953
	for epdb-commits@lists.rpath.com; Fri, 21 Sep 2007 17:06:08 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200709212106.l8LL68Ra020953@lambchop.rdu.rpath.com>
Date: Fri, 21 Sep 2007 17:06:08 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Sep 2007 21:10:27 -0000

user:        David Christian <http://issues.rpath.com>
files:       epdb/epdb.py

branch merge

diff -r 89faa3da8337 -r 8677d11de0b2 epdb/epdb.py
--- a/epdb/epdb.py	Fri Sep 21 15:23:23 2007 -0400
+++ b/epdb/epdb.py	Fri Sep 21 15:23:34 2007 -0400
@@ -124,7 +124,7 @@ class Epdb(pdb.Pdb):
             self.post_mortem(t, exc_type, exc_msg, port)
 
         def do_detach(self, arg):
-            if self.server:
+            if self._server:
                 print ('Leaving process in debug state - use "close" to'
                        ' stop debug session')
                 self._server.close_request()
@@ -133,7 +133,7 @@ class Epdb(pdb.Pdb):
                 print "Not attached via telnet"
 
         def do_close(self, arg):
-            if self.server:
+            if self._server:
                 print 'Ending epdb session - use "detach" to stop serving'
                 self._server.close_request()
                 return True

From dbc@rpath.com Fri Sep 21 17:10:33 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id l8LLAWEi011219
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:10:32 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id l8LL6Dcu021049
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:06:13 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id l8LL6DZs021039
	for epdb-commits@lists.rpath.com; Fri, 21 Sep 2007 17:06:13 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200709212106.l8LL6DZs021039@lambchop.rdu.rpath.com>
Date: Fri, 21 Sep 2007 17:06:13 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: Closing the epdb session is implicitly a request to
 continue.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Sep 2007 21:10:33 -0000

user:        David Christian <http://issues.rpath.com>
files:       epdb/epdb.py

Closing the epdb session is implicitly a request to continue.

diff -r 8677d11de0b2 -r 9c7f48999870 epdb/epdb.py
--- a/epdb/epdb.py	Fri Sep 21 15:23:34 2007 -0400
+++ b/epdb/epdb.py	Fri Sep 21 16:44:37 2007 -0400
@@ -136,7 +136,7 @@ class Epdb(pdb.Pdb):
             if self._server:
                 print 'Ending epdb session - use "detach" to stop serving'
                 self._server.close_request()
-                return True
+                return self.do_continue('')
             else:
                 print "Not attached via telnet"
 

From dbc@rpath.com Fri Sep 21 17:10:36 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id l8LLAZUP011227
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:10:35 -0400
Received: from lambchop.rdu.rpath.com (localhost.localdomain [127.0.0.1])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id l8LL6GT2021100
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Fri, 21 Sep 2007 17:06:17 -0400
Received: (from dbc@localhost)
	by lambchop.rdu.rpath.com (8.13.6/8.13.4/Submit) id l8LL6Gq9021090
	for epdb-commits@lists.rpath.com; Fri, 21 Sep 2007 17:06:16 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200709212106.l8LL6Gq9021090@lambchop.rdu.rpath.com>
Date: Fri, 21 Sep 2007 17:06:16 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.10 - support serve()
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Sep 2007 21:10:36 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       Makefile NEWS epdb/Makefile epdb/epdb.py epdb/telnetclient.py epdb/telnetserver.py

0.10 - support serve()

diff -r 9c7f48999870 -r 4d8ff377636d Makefile
--- a/Makefile	Fri Sep 21 16:44:37 2007 -0400
+++ b/Makefile	Fri Sep 21 17:05:58 2007 -0400
@@ -1,4 +1,4 @@ export VERSION = 0.9.1.1
-export VERSION = 0.9.1.1
+export VERSION = 0.10
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
diff -r 9c7f48999870 -r 4d8ff377636d NEWS
--- a/NEWS	Fri Sep 21 16:44:37 2007 -0400
+++ b/NEWS	Fri Sep 21 17:05:58 2007 -0400
@@ -1,3 +1,5 @@ Changes in 0.9.1.1:
+Changes in 0.10:
+    * epdb now supports a "serve()" command to serve epdb requests remotely
 Changes in 0.9.1.1:
     * epdb will automatically switch to the process group with session control,
       so that in programs where setpgrp() has been called, such processes 
diff -r 9c7f48999870 -r 4d8ff377636d epdb/Makefile
--- a/epdb/Makefile	Fri Sep 21 16:44:37 2007 -0400
+++ b/epdb/Makefile	Fri Sep 21 17:05:58 2007 -0400
@@ -6,6 +6,8 @@ python_files = __init__.py	\
 python_files = __init__.py	\
                epdb.py          \
                erlcompleter.py  \
+               telnetserver.py  \
+               telnetclient.py  \
                stackutil.py     
 
 dist_files = $(extra_files) $(python_files)
diff -r 9c7f48999870 -r 4d8ff377636d epdb/epdb.py
--- a/epdb/epdb.py	Fri Sep 21 16:44:37 2007 -0400
+++ b/epdb/epdb.py	Fri Sep 21 17:05:58 2007 -0400
@@ -55,9 +55,9 @@ class Epdb(pdb.Pdb):
     _displayList = {}
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
+    _server = None
 
     def __init__(self):
-        self._server = None
         self._exc_type = None
         self._exc_msg = None
         self._tb = None
@@ -112,30 +112,35 @@ class Epdb(pdb.Pdb):
         # telnet server support.
         # if enabled, you can serve a epdb session.
         def serve(self, port=8080):
-            print 'Serving on port %s' % port
-            self._server = telnetserver.InvertedTelnetServer(('', port))
-            self._server.handle_request()
+            if not Epdb._server:
+                print 'Serving on port %s' % port
+                Epdb._server = telnetserver.InvertedTelnetServer(('', port))
+                Epdb._server.handle_request()
+                Epdb._port = port
             self.set_trace(skip=2)
 
         def serve_post_mortem(self, t, exc_type=None, exc_msg=None, port=8080):
-            print 'Serving on port %s' % port
-            self._server = telnetserver.InvertedTelnetServer(('', port))
-            self._server.handle_request()
+            if not Epdb._server:
+                print 'Serving on port %s' % port
+                Epdb._server = telnetserver.InvertedTelnetServer(('', port))
+                Epdb._server.handle_request()
             self.post_mortem(t, exc_type, exc_msg, port)
 
         def do_detach(self, arg):
-            if self._server:
+            if Epdb._server:
                 print ('Leaving process in debug state - use "close" to'
                        ' stop debug session')
-                self._server.close_request()
-                self._server.handle_request()
+                Epdb._server.close_request()
+                Epdb._server = telnetserver.InvertedTelnetServer(('', Epdb._port))
+                Epdb._server.handle_request()
             else:
                 print "Not attached via telnet"
 
         def do_close(self, arg):
-            if self._server:
+            if Epdb._server:
                 print 'Ending epdb session - use "detach" to stop serving'
-                self._server.close_request()
+                Epdb._server.close_request()
+                Epdb._server = None
                 return self.do_continue('')
             else:
                 print "Not attached via telnet"
diff -r 9c7f48999870 -r 4d8ff377636d epdb/telnetclient.py
--- a/epdb/telnetclient.py	Fri Sep 21 16:44:37 2007 -0400
+++ b/epdb/telnetclient.py	Fri Sep 21 17:05:58 2007 -0400
@@ -10,6 +10,8 @@ import termios
 import termios
 
 from telnetlib import IAC, IP, SB, SE, NAWS
+
+TERMKEY = '\x1d' # equals ^]
 
 def getTerminalSize():
     s = struct.pack('HHHH', 0, 0, 0, 0)
@@ -51,17 +53,48 @@ class TelnetClient(telnetlib.Telnet):
         rows, cols = getTerminalSize()
         self.sock.sendall(IAC + SB + NAWS + chr(cols) + chr(rows) + IAC + SE)
 
+    def write(self, buffer):
+        if TERMKEY in buffer:
+            buffer = buffer[:buffer.find(TERMKEY)]
+            if buffer:
+                telnetlib.Telnet.write(self, buffer)
+            self.close()
+        else:
+            telnetlib.Telnet.write(self, buffer)
+
     def interact(self):
         self.set_raw_mode()
         self.updateTerminalSize()
         try:
+            writeBuffer = []
             while 1:
-                try:
-                    rfd, wfd, xfd = select.select([self, sys.stdin], [], [])
-                except select.error, err:
-                    if err.args[0] != errno.EINTR: # ignore interrupted select
-                        raise
-                if self in rfd:
+                readyWriters = []
+                readyReaders = []
+                neededReaders = [self, sys.stdin]
+                neededWriters = []
+                while 1:
+                    try:
+                        rfd, wfd, xfd = select.select(neededReaders,
+                                                      neededWriters, [])
+                    except select.error, err:
+                        if err.args[0] != errno.EINTR: # ignore interrupted select
+                            raise
+                    readyReaders.extend(rfd)
+                    [neededReaders.remove(x) for x in rfd if x in neededReaders]
+                    readyWriters.extend(wfd)
+                    [neededWriters.remove(x) for x in wfd if x in neededWriters]
+                    if self in readyReaders:
+                        if sys.stdout in readyWriters:
+                            break
+                        else:
+                            neededWriters.append(sys.stdout)
+                    if sys.stdin in readyReaders:
+                        if self in readyWriters:
+                            break
+                        else:
+                            neededWriters.append(self)
+                if self in readyReaders and sys.stdout in readyWriters:
+                    select.select([sys.stdin], [sys.stdout], [])
                     try:
                         text = self.read_eager()
                     except EOFError:
@@ -70,7 +103,7 @@ class TelnetClient(telnetlib.Telnet):
                     if text:
                         sys.stdout.write(text)
                         sys.stdout.flush()
-                if sys.stdin in rfd:
+                if sys.stdin in readyReaders and self in readyWriters:
                     line = sys.stdin.read(4096)
                     if not line:
                         break
diff -r 9c7f48999870 -r 4d8ff377636d epdb/telnetserver.py
--- a/epdb/telnetserver.py	Fri Sep 21 16:44:37 2007 -0400
+++ b/epdb/telnetserver.py	Fri Sep 21 17:05:58 2007 -0400
@@ -171,6 +171,7 @@ class InvertedTelnetRequestHandler(Telne
                 protocol = TelnetServerProtocolHandler(self.request, masterFd)
                 protocol.handle()
             finally:
+                os.close(masterFd)
                 os._exit(1)
 
 class InvertedTelnetServer(TelnetServer):
@@ -200,6 +201,9 @@ class InvertedTelnetServer(TelnetServer)
             return
         if self.verify_request(request, client_address):
             try:
+                # we only serve once, and we want to free up the port
+                # for future serves.
+                self.socket.close()
                 self.process_request(request, client_address)
             except SocketConnected, err:
                 self._serve_process(err.slaveFd, err.serverPid)

From dbc@rpath.com Tue Dec 11 10:00:17 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id lBBF0GSw028862
	for <epdb-commits@lists.rpath.com>; Tue, 11 Dec 2007 10:00:16 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id lBBEtMn5028217
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 11 Dec 2007 09:55:22 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id lBBEtMmJ024480
	for <epdb-commits@lists.rpath.com>; Tue, 11 Dec 2007 09:55:22 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id lBBEtMD1024465
	for epdb-commits@lists.rpath.com; Tue, 11 Dec 2007 09:55:22 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200712111455.lBBEtMD1024465@scc.eng.rpath.com>
Date: Tue, 11 Dec 2007 09:55:22 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: Fix close_request call
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2007 15:00:17 -0000

user:        David Christian <http://issues.rpath.com>
files:       epdb/telnetserver.py

Fix close_request call

diff -r 9e7afad9a317 -r 80fbcfa4250d epdb/telnetserver.py
--- a/epdb/telnetserver.py	Fri Nov 02 12:05:22 2007 -0400
+++ b/epdb/telnetserver.py	Tue Dec 11 09:54:29 2007 -0500
@@ -208,9 +208,9 @@ class InvertedTelnetServer(TelnetServer)
             except SocketConnected, err:
                 self._serve_process(err.slaveFd, err.serverPid)
                 return
-            except:
+            except Exception, err:
                 self.handle_error(request, client_address)
-                self.close_request(request)
+                self.close_request()
 
     def _serve_process(self, slaveFd, serverPid):
         """

From dbc@rpath.com Tue Dec 11 10:00:17 2007
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by lists.rpath.com (8.13.6/8.13.6) with ESMTP id lBBF0HBJ028865
	for <epdb-commits@lists.rpath.com>; Tue, 11 Dec 2007 10:00:17 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id lBBEtN88028220
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 11 Dec 2007 09:55:23 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id lBBEtMhX024507
	for <epdb-commits@lists.rpath.com>; Tue, 11 Dec 2007 09:55:22 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id lBBEtMmA024499
	for epdb-commits@lists.rpath.com; Tue, 11 Dec 2007 09:55:22 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200712111455.lBBEtMmA024499@scc.eng.rpath.com>
Date: Tue, 11 Dec 2007 09:55:22 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: 0.11
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2007 15:00:17 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       Makefile

0.11

diff -r 80fbcfa4250d -r d52538db925b Makefile
--- a/Makefile	Tue Dec 11 09:54:29 2007 -0500
+++ b/Makefile	Tue Dec 11 09:55:14 2007 -0500
@@ -1,4 +1,4 @@ export VERSION = 0.10
-export VERSION = 0.10
+export VERSION = 0.11
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/epdb-$(VERSION)
 export sitedir = $(libdir)/python$(PYVERSION)/site-packages/

From dbc@rpath.com Thu Oct 23 12:41:24 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m9NCfOtt029720
	for <epdb-commits@lists.rpath.com>; Thu, 23 Oct 2008 12:41:24 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m9NCfOeZ008517
	for <epdb-commits@lists.rpath.com>; Thu, 23 Oct 2008 08:41:24 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m9NCfOxg026639
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Thu, 23 Oct 2008 08:41:24 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m9NCfO0b016318
	for <epdb-commits@lists.rpath.com>; Thu, 23 Oct 2008 08:41:24 -0400
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m9NCfNtp016313
	for epdb-commits@lists.rpath.com; Thu, 23 Oct 2008 08:41:23 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200810231241.m9NCfNtp016313@scc.eng.rpath.com>
Date: Thu, 23 Oct 2008 08:41:23 -0400
To: epdb-commits@lists.rpath.com
Subject: epdb: close connection on ctrl-c
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2008 12:41:25 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       epdb/telnetclient.py

close connection on ctrl-c

diff -r d52538db925b -r a24aaf8c5147 epdb/telnetclient.py
--- a/epdb/telnetclient.py	Tue Dec 11 09:55:14 2007 -0500
+++ b/epdb/telnetclient.py	Thu Oct 23 08:41:19 2008 -0400
@@ -45,6 +45,8 @@
 
     def ctrl_c(self, int, tb):
         self.sock.sendall(IAC + IP)
+        self.sock.sendall('close\n')
+        raise KeyboardInterrupt
 
     def sigwinch(self, int, tb):
         self.updateTerminalSize()

From dbc@rpath.com Tue Nov 11 21:56:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mABLuJhZ007682
	for <epdb-commits@lists.rpath.com>; Tue, 11 Nov 2008 21:56:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mABLuJUV028945
	for <epdb-commits@lists.rpath.com>; Tue, 11 Nov 2008 16:56:19 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mABLuJI8019108
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Tue, 11 Nov 2008 16:56:19 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mABLuInA031493
	for <epdb-commits@lists.rpath.com>; Tue, 11 Nov 2008 16:56:18 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mABLuIBn031488
	for epdb-commits@lists.rpath.com; Tue, 11 Nov 2008 16:56:18 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200811112156.mABLuIBn031488@scc.eng.rpath.com>
Date: Tue, 11 Nov 2008 16:56:18 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: Switch to absolute imports
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 11 Nov 2008 21:56:19 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       epdb/epdb.py

Switch to absolute imports

diff -r a24aaf8c5147 -r a148bc622f3d epdb/epdb.py
--- a/epdb/epdb.py	Thu Oct 23 08:41:19 2008 -0400
+++ b/epdb/epdb.py	Tue Nov 11 16:56:03 2008 -0500
@@ -13,7 +13,6 @@
 
 """ Extended pdb """
 import bdb
-import stackutil
 import inspect
 import pdb
 import os
@@ -33,8 +32,9 @@
 import traceback
 
 try:
-    import telnetserver
-    import telnetclient
+    from epdb import telnetserver
+    from epdb import telnetclient
+    from epdb import stackutil
     hasTelnet = True
 except ImportError:
     hasTelnet = False

From dbc@rpath.com Wed Nov 12 16:05:28 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACG5SYT017365
	for <epdb-commits@lists.rpath.com>; Wed, 12 Nov 2008 16:05:28 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACG5Sd4028976
	for <epdb-commits@lists.rpath.com>; Wed, 12 Nov 2008 11:05:28 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACG5Rse001028
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Wed, 12 Nov 2008 11:05:28 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACG5RwU022747
	for <epdb-commits@lists.rpath.com>; Wed, 12 Nov 2008 11:05:27 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACG5RtH022742
	for epdb-commits@lists.rpath.com; Wed, 12 Nov 2008 11:05:27 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200811121605.mACG5RtH022742@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 11:05:27 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: ignore a signal setting failure that occurs when we're not
	in the main thread.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 16:05:28 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       epdb/telnetserver.py

ignore a signal setting failure that occurs when we're not in the main thread.

diff -r a148bc622f3d -r 0c7867a53a5e epdb/telnetserver.py
--- a/epdb/telnetserver.py	Tue Nov 11 16:56:03 2008 -0500
+++ b/epdb/telnetserver.py	Wed Nov 12 11:05:24 2008 -0500
@@ -154,7 +154,11 @@
     def handle(self):
         masterFd, slaveFd = pty.openpty()
 
-        signal.signal(signal.SIGTTOU, signal.SIG_IGN)
+        try:
+            # if we're not in the main thread, this will not work.
+            signal.signal(signal.SIGTTOU, signal.SIG_IGN)
+        except:
+            pass
         pid = os.fork()
         if pid:
             os.close(masterFd)

From dbc@rpath.com Mon Feb 23 15:10:01 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n1NKA1LL002459
	for <epdb-commits@lists.rpath.com>; Mon, 23 Feb 2009 20:10:01 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n1NKA0se027116
	for <epdb-commits@lists.rpath.com>; Mon, 23 Feb 2009 15:10:01 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n1NKA0BQ019315
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <epdb-commits@lists.rpath.com>; Mon, 23 Feb 2009 15:10:00 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n1NKA0dZ031690
	for <epdb-commits@lists.rpath.com>; Mon, 23 Feb 2009 15:10:00 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n1NKA0Ib031685
	for epdb-commits@lists.rpath.com; Mon, 23 Feb 2009 15:10:00 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200902232010.n1NKA0Ib031685@scc.eng.rpath.com>
Date: Mon, 23 Feb 2009 15:09:59 -0500
To: epdb-commits@lists.rpath.com
Subject: epdb: Replace tab with spaces
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: epdb-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: epdb module commits <epdb-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/epdb-commits>
List-Post: <mailto:epdb-commits@lists.rpath.com>
List-Help: <mailto:epdb-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/epdb-commits>,
	<mailto:epdb-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Feb 2009 20:10:02 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       epdb/epdb.py

Replace tab with spaces

diff -r 0c7867a53a5e -r 990373aa5e8b epdb/epdb.py
--- a/epdb/epdb.py	Wed Nov 12 11:05:24 2008 -0500
+++ b/epdb/epdb.py	Mon Feb 23 15:09:50 2009 -0500
@@ -734,7 +734,7 @@
         if self.__old_stdin is not None:
             sys.stdin = self.__old_stdin
         if self.__old_pgid is not None:
-	    os.setpgid(0, self.__old_pgid)
+            os.setpgid(0, self.__old_pgid)
 
     def switch_pgid(self):
         try:


