You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trace.py didn't work for me with Python 2.2a4+,
possibly due to me misunderstanding how to use it.
In any case this version is substantially rewritten,
uses the debugger hooks that were introduced in Python
2.1(?), and has a simpler (in my opinion) interface.
Also there are some new features like "countfuncs" mode
which is faster than "count" mode and reports only a
list of funcs that were invoked.
In addition, I think there needs to e a doc string
explaining what the --count and --report options do, and how
the --file option figures.
I am completely unable to understand how these interoperate.
:-(
zooko commented on Nov 3, 2001
zookomannequin
MannequinAuthor
More actions
Logged In: YES
user_id=52562
I'll be happy to add doco about --count, --report, and
--file after I return from the O'Reilly p2p conference.
(i.e. more than a week from now).
I'm going to be in Europe on business for the next two weeks. I should have a fair amount of dead time in my hotel room. I'll try to take a look at it then.
zooko commented on Nov 28, 2001
zookomannequin
MannequinAuthor
More actions
Logged In: YES
user_id=52562
Guido: did you see the usage string?
I'm looking at it and not seeing how to make it more clear
right now. Okay I'll try tweaking it a bit...
In Mojo NatioExecution:
--help Display this help then exit.
--version Output version information then exit.
-t,--trace Print each line to sys.stdout before
it is executed.
-c,--count Count the number of times each line
is executed.
After the program exits, results
are written to the
results file if --file' is given, else to sys.stdout. -r,--report Generate a report from a results file; do not execute any code. --file' must
specify the results
file to read.
(One of -t', -c' or `-r' must be specified)
-s,--summary Generate a brief summary for each
file. (Can only
be used with -c or -r.)
I/O:
-f,--file= File name for accumulating results
over several runs.
(No file name means do not archive
results)
-d,--logdir= Directory to use when writing
annotated log files.
Log files are the module __name__
with `.` replaced
by os.sep and with '.pyl' added.
-m,--missing Annotate all executable lines which
were not executed
with a '>>>>>> '.
-R,--no-report Do not generate the annotated
reports. Useful if
you want to accumulate several over
tests.
-C,--coverdir= Generate .cover files in this directory
Selection: Do not trace or log lines from ...
--ignore-module=[string] modules with the given
__name__, and submodules
of that module
--ignore-dir=[string] files in the stated directory
(multiple
directories can be joined by
os.pathsep)
The selection options can be listed multiple times to
ignore different
modules.
Well, then it doesn't work. When I do "trace.py --count
hello.py", it doesn't print any usage stats to stdout. When
I add "--file foo", it writes some binary data to foo. When
I then do "trace.py --report --file foo hello.py" I get no
output. This is with your version, but Skips version had
the same problem.
zooko commented on Nov 28, 2001
zookomannequin
MannequinAuthor
More actions
Logged In: YES
user_id=52562
Uh... Oh yeah, you're right. (I actually use it
programmatically and not through the command line.)
Okay I don't know *what* it is supposed to do. I'm working
on figuring it out right now and I'll submit a patch when done.
a) do the docs clearly specify the behavior?
b) is that the behavior you want?
c) does it actually behave like that when you try it?
(Works on my machine...)
Activity
zooko commentedon Oct 31, 2001
trace.py didn't work for me with Python 2.2a4+,
possibly due to me misunderstanding how to use it.
In any case this version is substantially rewritten,
uses the debugger hooks that were introduced in Python
2.1(?), and has a simpler (in my opinion) interface.
Also there are some new features like "countfuncs" mode
which is faster than "count" mode and reports only a
list of funcs that were invoked.
gvanrossum commentedon Nov 1, 2001
Logged In: YES
user_id=6380
Skip, what do you think of this?
In addition, I think there needs to e a doc string
explaining what the --count and --report options do, and how
the --file option figures.
I am completely unable to understand how these interoperate.
:-(
zooko commentedon Nov 3, 2001
Logged In: YES
user_id=52562
I'll be happy to add doco about --count, --report, and
--file after I return from the O'Reilly p2p conference.
(i.e. more than a week from now).
Regards,
Zooko
smontanaro commentedon Nov 3, 2001
Logged In: YES
user_id=44345
I'm going to be in Europe on business for the next two weeks. I should have a fair amount of dead time in my hotel room. I'll try to take a look at it then.
zooko commentedon Nov 28, 2001
Logged In: YES
user_id=52562
Guido: did you see the usage string?
I'm looking at it and not seeing how to make it more clear
right now. Okay I'll try tweaking it a bit...
In Mojo NatioExecution:
--help Display this help then exit.
--version Output version information then exit.
-t,--trace Print each line to sys.stdout before
it is executed.
-c,--count Count the number of times each line
is executed.
After the program exits, results
are written to the
results file if
--file' is given, else to sys.stdout. -r,--report Generate a report from a results file; do not execute any code.--file' mustspecify the results
file to read.
(One of
-t',-c' or `-r' must be specified)-s,--summary Generate a brief summary for each
file. (Can only
be used with -c or -r.)
I/O: -f,--file= File name for accumulating results over several runs. (No file name means do not archive results) -d,--logdir= Directory to use when writing annotated log files. Log files are the module __name__ with `.` replaced by os.sep and with '.pyl' added. -m,--missing Annotate all executable lines which were not executed with a '>>>>>> '. -R,--no-report Do not generate the annotated reports. Useful if you want to accumulate several over tests. -C,--coverdir= Generate .cover files in this directorySelection: Do not trace or log lines from ...
--ignore-module=[string] modules with the given
__name__, and submodules
of that module
--ignore-dir=[string] files in the stated directory
(multiple
directories can be joined by
os.pathsep)
The selection options can be listed multiple times to
ignore different
modules.
n CVS:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mojonation/evil/common/trace.py?rev=HEAD&content-type=text/vnd.viewcvs-markup
the usage string now looks like this:
gvanrossum commentedon Nov 28, 2001
Logged In: YES
user_id=6380
Well, then it doesn't work. When I do "trace.py --count
hello.py", it doesn't print any usage stats to stdout. When
I add "--file foo", it writes some binary data to foo. When
I then do "trace.py --report --file foo hello.py" I get no
output. This is with your version, but Skips version had
the same problem.
zooko commentedon Nov 28, 2001
Logged In: YES
user_id=52562
Uh... Oh yeah, you're right. (I actually use it
programmatically and not through the command line.)
Okay I don't know *what* it is supposed to do. I'm working
on figuring it out right now and I'll submit a patch when done.
--Z
zooko commentedon Nov 28, 2001
Logged In: YES
user_id=52562
Please look at the latest version:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mojonation/evil/common/trace.py
a) do the docs clearly specify the behavior?
b) is that the behavior you want?
c) does it actually behave like that when you try it?
(Works on my machine...)
--Z
gvanrossum commentedon Nov 28, 2001
Logged In: YES
user_id=6380
Ah, now I finally understand what it is *supposed* to do!
I've updated the usage message to clarify that, and checked
in the rest of your changes.
Since Skip doesn't seem to be interested in this, I've
reassigned it to me -- and closed.