Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'output': 0.04; 'test,': 0.05; 'bash': 0.07; 'completeness': 0.07; 'subject:How': 0.09; 'python': 0.09; 'received:155': 0.09; 'subject:skip:a 10': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; 'subject:python': 0.11; '"hello': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'securities,': 0.16; 'trace,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; 'pfxlen:0': 0.17; 'specify': 0.17; 'combination': 0.22; 'trace': 0.22; 'cc:2**0': 0.23; 'received:169.254': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; '---': 0.26; 'skip:# 10': 0.27; 'accuracy': 0.27; 'options': 0.27; 'cat': 0.29; 'received:169': 0.29; "i'm": 0.29; 'url:python': 0.32; 'print': 0.32; 'screen': 0.34; 'subject:?': 0.35; 'there': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'url:docs': 0.38; 'information,': 0.63; 'url:email': 0.63; 'legal': 0.65; 'subject': 0.66; 'purchase': 0.67; 'sale': 0.76; 'received:169.254.8': 0.84; 'subject:commands': 0.84; 'world!"': 0.84 X-DKIM: OpenDKIM Filter v2.1.3 sz2.jpmchase.com qA9LQLZ2010500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1352496381; bh=sVOWqyPFZtaWjd3o0wHYxv7HOgGw/akQTSgi4Apd0TU=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=YqPMOdExIF+288bFntq957jO2kzdzUd0BajtD2GyuN0TKpMtXLUS2cw43TT3P1NYg MPdfjLOjiPDEjCBbT7YUiSkJm4GPXvtLsoGi2RArI5seWWdtLibLrH1BYUQEd0Cq9d VkbRtgfi4xqbRFzX2U5qKJbPeQ9KWS7uGLuowl9w= From: "Prasad, Ramit" To: Peng Yu Subject: RE: How to print python commands automatically? Thread-Topic: How to print python commands automatically? Thread-Index: AQHNvgbs07IZYbXoAkK5QJTU6oMiJJfgz0e6gAGD9QD//7D24A== Date: Fri, 9 Nov 2012 21:26:08 +0000 References: <603f952f-a1a2-48a3-ab55-bdc7982a1f2a@i7g2000pbf.googlegroups.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.79.47] Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352496389 news.xs4all.nl 6895 [2001:888:2000:d::a6]:60015 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33053 Peng Yu wrote:=0D=0A> =0D=0A> > Is this what you want?=0D=0A> > http://docs= =2Epython=2Eorg/2/library/trace=2Ehtml=0D=0A> =0D=0A> I'm not able to get t= he mixing of the python command screen output on=0D=0A> stdout=2E Is there = a combination of options for this purpose?=0D=0A> =0D=0A> ~/linux/test/pyth= on/man/library/trace$ cat main1=2Epy=0D=0A> #!/usr/bin/env python=0D=0A> = =0D=0A> def f():=0D=0A> print "Hello World!"=0D=0A> =0D=0A> f()=0D=0A> ~/= linux/test/python/man/library/trace$ cat main=2Esh=0D=0A> #!/usr/bin/env ba= sh=0D=0A> =0D=0A> python -m trace --count -C =2E main1=2Epy -t=0D=0A> =0D= =0A> ~/linux/test/python/man/library/trace$ =2E/main=2Esh=0D=0A> Hello Worl= d!=0D=0A> ~/linux/test/python/man/library/trace$ cat main1=2Ecover=0D=0A> = #!/usr/bin/env python=0D=0A> =0D=0A> 1: def f():=0D=0A> 1: = print "Hello World!"=0D=0A> =0D=0A> 1: f()=0D=0A> =0D=0A=0D=0ATry with = just --trace?=0D=0A=0D=0A=0D=0AC:\ramit>python=2Eexe -m trace test=2Epy=0D= =0AC:\ramit\Python27\lib\trace=2Epy: must specify one of --trace, --count, = --report, --listfuncs, or --trackcalls=0D=0A=0D=0AC:\ramit>python -m trace = --trace test=2Epy=0D=0A --- modulename: test, funcname: =0D=0Atest= =2Epy(2): def f():=0D=0Atest=2Epy(5): f()=0D=0A --- modulename: test, funcn= ame: f=0D=0Atest=2Epy(3): print "Hello World!"=0D=0AHello World!=0D=0A = --- modulename: trace, funcname: _unsettrace=0D=0Atrace=2Epy(80): s= ys=2Esettrace(None)=0D=0A=0D=0A=0D=0A=0D=0A~Ramit=0D=0A=0D=0A=0D=0AThis ema= il is confidential and subject to important disclaimers and=0D=0Aconditions= including on offers for the purchase or sale of=0D=0Asecurities, accuracy = and completeness of information, viruses,=0D=0Aconfidentiality, legal privi= lege, and legal entity disclaimers,=0D=0Aavailable at http://www=2Ejpmorgan= =2Ecom/pages/disclosures/email=2E