How to print python commands automatically?

Peng Yu pengyu.ut at
Fri Nov 9 22:03:58 CET 2012

> Is this what you want?

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
#!/usr/bin/env python

def f():
  print "Hello World!"

~/linux/test/python/man/library/trace$ cat
#!/usr/bin/env bash

python -m trace --count -C . -t

~/linux/test/python/man/library/trace$ ./
Hello World!
~/linux/test/python/man/library/trace$ cat main1.cover
       #!/usr/bin/env python

    1: def f():
    1:   print "Hello World!"

    1: f()


More information about the Python-list mailing list