[Python-checkins] CVS: python/dist/src/Tools/scripts trace.py,1.5,1.6

Guido van Rossum gvanrossum@users.sourceforge.net
Wed, 28 Nov 2001 11:41:47 -0800


Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory usw-pr-cvs1:/tmp/cvs-serv22978

Modified Files:
	trace.py 
Log Message:
Checking in Zooko's version per SF patch #476866, plus my changes to
the usage docs: (a) align properly, (b) explain properly.


Index: trace.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/trace.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** trace.py	2001/10/08 20:33:20	1.5
--- trace.py	2001/11/28 19:41:45	1.6
***************
*** 1,4 ****
--- 1,11 ----
  #!/usr/bin/env python
  
+ # portions copyright 2001, Autonomous Zones Industries, Inc., all rights...
+ # err...  reserved and offered to the public under the terms of the
+ # Python 2.2 license.
+ # Author: Zooko O'Whielacronx
+ # http://zooko.com/
+ # mailto:zooko@zooko.com
+ #
[...1024 lines suppressed...]
!     else:
!         sys.argv = prog_argv
!         progname = prog_argv[0]
!         if eval(sys.version[:3])>1.3:
!             sys.path[0] = os.path.split(progname)[0] # ???
  
!         t = Trace(count, trace, countfuncs=listfuncs, ignoremods=ignore_modules, ignoredirs=ignore_dirs, infile=counts_file, outfile=counts_file)
          try:
!             t.run('execfile(' + `progname` + ')')
          except IOError, err:
!             _err_exit("Cannot run file %s because: %s" % (`sys.argv[0]`, err))
          except SystemExit:
              pass
  
          results = t.results()
  
          if not no_report:
!             results.write_results(missing, summary=summary, coverdir=coverdir)
  
  if __name__=='__main__':