Message111027
| Author |
eli.bendersky |
| Recipients |
belopolsky, eli.bendersky, terry.reedy |
| Date |
2010年07月21日.09:26:46 |
| SpamBayes Score |
0.02781398 |
| Marked as misclassified |
No |
| Message-id |
<1279704408.74.0.388512527067.issue9317@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Alexander,
I propose an alternative patch (attached issue9317.2.diff). It uses:
with open(progname) as fp:
code = compile(fp.read(), progname, 'exec')
t.run(code)
Since the `run` method of Trace already accepts a code object and passes it to `exec`, I see no reason to do another `exec`.
This also fixes your 'traceme' problem, without introducing new module imports:
$ py3d -m trace -c -s traceme.py
lines cov% module (path)
1 100% threading (/home/eliben/python_src/eliben-py3k/Lib/threading.py)
6 100% traceme (traceme.py)
[47526 refs] |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年07月21日 09:26:48 | eli.bendersky | set | recipients:
+ eli.bendersky, terry.reedy, belopolsky |
| 2010年07月21日 09:26:48 | eli.bendersky | set | messageid: <1279704408.74.0.388512527067.issue9317@psf.upfronthosting.co.za> |
| 2010年07月21日 09:26:47 | eli.bendersky | link | issue9317 messages |
| 2010年07月21日 09:26:46 | eli.bendersky | create |
|