Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19628

Debugging / profiling subscripts

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!62.179.104.142.MISMATCH!amsnews11.chello.com!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <andrea.crotti.0@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.054
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'debug': 0.03; 'python': 0.08; 'subprocess': 0.09; 'pdb;': 0.16; 'shell=true)': 0.16; 'subprocess,': 0.16; 'import': 0.27; 'script': 0.28; 'example': 0.28; 'cmd': 0.30; 'that,': 0.32; 'message-id:@gmail.com': 0.33; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.33; 'it?': 0.33; 'there': 0.33; 'received:209.85.212': 0.34; 'certain': 0.34; 'running': 0.35; 'something': 0.35; 'run': 0.37; 'reasons': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'another': 0.37; 'some': 0.38; 'received:209.85': 0.38; 'received:209': 0.39; 'doing': 0.39; 'to:addr:python.org': 0.40; 'under': 0.40; 'subject: / ': 0.63; 'profile': 0.73; 'conditions,': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=THiTeikPMPcSjv5AlsZ2G0mVVLajEQmosldxdK4dtFc=; b=iGZlHZDfCfK6io09NLujxTYfF5Cgi/6AWe1IRS17lNQ7KuiKEYGjLMt8PiK/trYI+Q PNUeZkuMWHQZNbmDoGa8CXu/Hy7GYbfX2atRxlbBMW6v686CJy9aY9+CPpcK23eMYgzL uQJek6cXuPxe1DWoTmImaplvO3iVYGShEn88s=
Date Tue, 31 Jan 2012 11:33:56 +0000
From Andrea Crotti <andrea.crotti.0@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111224 Thunderbird/9.0.1
MIME-Version 1.0
To python-list@python.org
Subject Debugging / profiling subscripts
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5236.1328009640.27778.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328009640 news.xs4all.nl 6960 [2001:888:2000:d::a6]:36558
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19628

Show key headers only | View raw


If for example I have a Python script which for some reasons needs to
run another Python script as a subprocess, is there a way to debug /
profile it?

If I add an
import pdb; pdb.set_trace()

In my specific case I am running a program that, under certain
conditions, has to restart from scratch, doing something like

cmd = ["python"] + sys.argv
Popen(cmd, shell=True)

but the subprocess becomes than a black box..

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Debugging / profiling subscripts Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-01-31 11:33 +0000

csiph-web