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


Groups > comp.lang.python > #33049

Re: How to print python commands automatically?

References <dde69612-f2f5-4eed-a6fc-f2a2e8af4f75@v3g2000yqb.googlegroups.com> <603f952f-a1a2-48a3-ab55-bdc7982a1f2a@i7g2000pbf.googlegroups.com>
Date 2012-11-09 15:03 -0600
Subject Re: How to print python commands automatically?
From Peng Yu <pengyu.ut@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3513.1352495041.27098.python-list@python.org> (permalink)

Show all headers | View raw


> 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

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


Thread

How to print python commands automatically? Peng Yu <pengyu.ut@gmail.com> - 2012-11-08 15:12 -0800
  Re: How to print python commands automatically? rusi <rustompmody@gmail.com> - 2012-11-08 18:50 -0800
    Re: How to print python commands automatically? Peng Yu <pengyu.ut@gmail.com> - 2012-11-09 15:03 -0600
    RE: How to print python commands automatically? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-09 21:26 +0000
    Re: How to print python commands automatically? Peng Yu <pengyu.ut@gmail.com> - 2012-11-09 16:40 -0600
      Re: How to print python commands automatically? rusi <rustompmody@gmail.com> - 2012-11-10 07:16 -0800

csiph-web