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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'output': 0.04; 'bash': 0.07; 'subject:How': 0.09; 'python': 0.09; 'subject:skip:a 10': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; 'subject:python': 0.11; '"hello': 0.16; 'combination': 0.22; 'trace': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'skip:# 10': 0.27; 'message- id:@mail.gmail.com': 0.27; 'options': 0.27; 'cat': 0.29; "i'm": 0.29; 'url:python': 0.32; 'print': 0.32; 'received:google.com': 0.34; 'screen': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'header:Received:5': 0.40; 'subject:commands': 0.84; 'world!"': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U3v+0bZPLsIQPYTPm3iegZcIsPg9n7e6NZAdywC0Sf8=; b=bLrVb6IGalzw6JR+j+lpgJ3so+fD26L6nWr3OxLsNWGqFkSXkIKOPZXL7v+waxKVeS 51yiv5p9SiTgWi7LU69sW2U1JXmiU4+4UpQPA3AKR9PYxlx1rY5ggne6ryIO2UwYFeEe qKYaUNvfuUN8J/SXl3bdH2ipW3I+1uZLZwoEHoL6hrHHO3G77XQ/vA/9ooonsqBQpbqG sFPgCLq0weLgl7RuTUKP2pq3Lm181qXRwLAGwh6VbDtzAT3aGBJVRYCPLgceIYWtuklM QUh5zV0gLT5sRCdR3W6upNh6J/Qm3A//GgXD1JxRJ/GICiMNzTSXJLXD36U81yLBAugV uTzw== MIME-Version: 1.0 In-Reply-To: <603f952f-a1a2-48a3-ab55-bdc7982a1f2a@i7g2000pbf.googlegroups.com> References: <603f952f-a1a2-48a3-ab55-bdc7982a1f2a@i7g2000pbf.googlegroups.com> Date: Fri, 9 Nov 2012 15:03:58 -0600 Subject: Re: How to print python commands automatically? From: Peng Yu To: rusi Content-Type: text/plain; charset=ISO-8859-1 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352495041 news.xs4all.nl 6884 [2001:888:2000:d::a6]:44096 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33049 > Is this what you want? > http://docs.python.org/2/library/trace.html I'm not able to get the mixing of the python command screen output on stdout. Is there a combination of options for this purpose? ~/linux/test/python/man/library/trace$ cat main1.py #!/usr/bin/env python def f(): print "Hello World!" f() ~/linux/test/python/man/library/trace$ cat main.sh #!/usr/bin/env bash python -m trace --count -C . main1.py -t ~/linux/test/python/man/library/trace$ ./main.sh Hello World! ~/linux/test/python/man/library/trace$ cat main1.cover #!/usr/bin/env python 1: def f(): 1: print "Hello World!" 1: f() -- Regards, Peng