Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Support bacteria -- it's the only culture some people have!


devel / comp.lang.python / Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]

SubjectAuthor
o Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]Grant Edwards

1
Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]

<mailman.469.1622567313.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13495&group=comp.lang.python#13495

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: grant.b....@gmail.com (Grant Edwards)
Newsgroups: comp.lang.python
Subject: Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]
Date: Mon, 31 May 2021 15:16:50 -0000 (UTC)
Lines: 23
Message-ID: <mailman.469.1622567313.3087.python-list@python.org>
References: <000001d75578$f4ced0b0$de6c7210$@earthlink.net>
<s90t32$112e$1@ciao.gmane.io> <s92ul2$c66$1@ciao.gmane.io>
X-Trace: news.uni-berlin.de U1cnhG8UrM+C6a1dDs24bwWUOAIGFRDML5JNwExf11bw==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:python': 0.06;
'debug': 0.07; 'debugging': 0.07; '(python': 0.09; 'alone.': 0.09;
'message-id:@ciao.gmane.io': 0.09; 'module.': 0.09;
'received:ciao.gmane.io': 0.09; 'received:gmane.io': 0.09;
'received:list': 0.09; 'terminal': 0.09; 'window.': 0.09; 'log':
0.12; "can't": 0.14; 'debug?': 0.16; 'debugger': 0.16;
'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards':
0.16; 'gauld': 0.16; 'received:116.202': 0.16;
'received:116.202.254': 0.16; 'received:116.202.254.214': 0.16;
'subject:debug': 0.16; 'wrote:': 0.16; 'python': 0.16; 'grant':
0.17; 'figure': 0.18; 'uses': 0.19; 'calls': 0.20; 'subject:How':
0.22; 'to:addr:python-list': 0.23; 'run': 0.24; 'written': 0.24;
'tried': 0.26; 'header:User-Agent:1': 0.31; 'but': 0.31;
'approach': 0.31; 'script': 0.32; 'attach': 0.32; 'python-list':
0.32; 'window': 0.32; 'program': 0.33; 'year': 0.35;
'from:addr:gmail.com': 0.35; "that's": 0.37; 'file': 0.38;
'something': 0.38; 'use': 0.38; 'could': 0.40; 'skip:w 10': 0.61;
'facility': 0.69; 'received:116': 0.71; 'subject:]': 0.71;
'subject:skip:w 10': 0.77; 'biggest': 0.84; 'redirect': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: slrn/1.0.3 (Linux)
X-Mailman-Approved-At: Tue, 01 Jun 2021 13:08:31 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <s92ul2$c66$1@ciao.gmane.io>
X-Mailman-Original-References: <000001d75578$f4ced0b0$de6c7210$@earthlink.net>
<s90t32$112e$1@ciao.gmane.io>
 by: Grant Edwards - Mon, 31 May 2021 15:16 UTC

On 2021-05-30, Alan Gauld via Python-list <python-list@python.org> wrote:
> On 30/05/2021 18:26, pjfarley3@earthlink.net wrote:
>> I tried winpdb-reborn some time last year on my Win10 system (python 3.8.3
>> at that time), but could not figure out how to use it to debug a python
>> script that uses the curses module.
>
> You are not alone. debugging curses is one of the biggest obstacles to
> its use.

Can't you just run the debugger in a different window and attach to
the process you want to debug? That's how one uses a debugger with
curses apps written in C/C++. Or I add debugging printf calls which
write to stderr and redirect stderr to a file.

> My approach is to define a status line at the bottom of my program and
> write print statements into that window. Something like:

Why not just use the standard python logging facility and log to a
file or another terminal window?

--
Grant

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor