;
Êâ"Ic               @   s?  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z
 d d l Z d „  Z d Z e j d ƒ Z Gd „  d ƒ Z d „  Z d	 „  Z Gd
 „  d ƒ Z d „  Z d „  Z d „  Z d „  Z Gd „  d ƒ Z d „  Z d d „ Z e d k o e ƒ  n d S(   uª  program/module to trace Python program or function execution

Sample use, command line:
  trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs
  trace.py -t --ignore-dir '$prefix' spam.py eggs
  trace.py --trackcalls spam.py eggs

Sample use, programmatically
  import sys

  # create a Trace object, telling it what to ignore, and whether to
  # do tracing or line-counting or both.
  tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,], trace=0,
                    count=1)
  # run the new command using the given tracer
  tracer.run('main()')
  # make a report, placing output in /tmp
  r = tracer.results()
  r.write_results(show_missing=True, coverdir="/tmp")
i    Nc             C   s   |  j  d t j d ƒ d  S(   Nu	  Usage: %s [OPTIONS] <file> [ARGS]

Meta-options:
--help                Display this help then exit.
--version             Output version information then exit.

Otherwise, exactly one of the following three options must be given:
-t, --trace           Print each line to sys.stdout before it is executed.
-c, --count           Count the number of times each line is executed
                      and write the counts to <module>.cover for each
                      module executed, in the module's directory.
                      See also `--coverdir', `--file', `--no-report' below.
-l, --listfuncs       Keep track of which functions are executed at least
                      once and write the results to sys.stdout after the
                      program exits.
-T, --trackcalls      Keep track of caller/called pairs and write the
                      results to sys.stdout after the program exits.
-r, --report          Generate a report from a counts file; do not execute
                      any code.  `--file' must specify the results file to
                      read, which must have been created in a previous run
                      with `--count --file=FILE'.

Modifiers:
-f, --file=<file>     File to accumulate counts over several runs.
-R, --no-report       Do not generate the coverage report files.
                      Useful if you want to accumulate over several runs.
-C, --coverdir=<dir>  Directory where the report files.  The coverage
                      report for <package>.<module> is written to file
                      <dir>/<package>/<module>.cover.
-m, --missing         Annotate executable lines that were not executed
                      with '>>>>>> '.
-s, --summary         Write a brief summary on stdout for each file.
                      (Can only be used with --count or --report.)
-g, --timing          Prefix each line with the time since the program started.
                      Only used while tracing.

Filters, may be repeated multiple times:
--ignore-module=<mod> Ignore the given module(s) and its submodules
                      (if it is a package).  Accepts comma separated
                      list of module names
--ignore-dir=<dir>    Ignore files in the given directory (multiple
                      directories can be joined by os.pathsep).
i    (   u   writeu   sysu   argv(   u   outfile(    (    u"   /mit/python/lib/python3.0/trace.pyu   usage@   s    *u   #pragma NO COVERu   ^\s*(#.*)?$c             B   s&   |  Ee  Z d d d  „ Z d „  Z d S(   c             C   sO   | p g  |  _  | p g  |  _ t t j j |  j ƒ |  _ i d d 6|  _ d  S(   Ni   u   <string>(   u   _modsu   _dirsu   mapu   osu   pathu   normpathu   _ignore(   u   selfu   modulesu   dirs(    (    u"   /mit/python/lib/python3.0/trace.pyu   __init__s   s    c             C   s  | |  j  k o |  j  | Sxv |  j D]k } | | k o d |  j  | <d St | ƒ } | | d  | … k o# | | d k o d |  j  | <d Sq& W| d  k o d |  j  | <d Sx: |  j D]/ } | j | t j ƒ o d |  j  | <d Sq¾ Wd |  j  | <d S(   Ni   u   .i    (   u   _ignoreu   _modsu   lenu   Noneu   _dirsu
   startswithu   osu   sep(   u   selfu   filenameu
   modulenameu   modu   nu   d(    (    u"   /mit/python/lib/python3.0/trace.pyu   namesz   s*    
 (	
 	N(   u   __name__u
   __module__u   Noneu   __init__u   names(   u
   __locals__(    (    u"   /mit/python/lib/python3.0/trace.pyu   Ignorer   s   
u   Ignorec             C   s.   t  j j |  ƒ } t  j j | ƒ \ } } | S(   u-   Return a plausible module name for the patch.(   u   osu   pathu   basenameu   splitext(   u   pathu   baseu   filenameu   ext(    (    u"   /mit/python/lib/python3.0/trace.pyu   modname§   s    c             C   s  t  j j |  ƒ } d } xt t j D]i } t  j j | ƒ } | j | ƒ oA | t | ƒ t  j k o' t | ƒ t | ƒ k o
 | } q‹ q" q" W| o |  t | ƒ d d … } n |  } | j t  j d ƒ } t  j o | j t  j d ƒ } n t  j j	 | ƒ \ } } | S(   u,   Return a plausible module name for the path.u    i   Nu   .(
   u   osu   pathu   normcaseu   sysu
   startswithu   lenu   sepu   replaceu   altsepu   splitext(   u   pathu   comparepathu   longestu   diru   baseu   filenameu   ext(    (    u"   /mit/python/lib/python3.0/trace.pyu   fullmodname®   s     
 *
c             B   sJ   |  Ee  Z d d d d d d  „ Z d „  Z d d d d „ Z d „  Z d S(   c             C   sc  | |  _  |  j  d  k o i  |  _  n |  j  j ƒ  |  _ | |  _ |  j d  k o i  |  _ n |  j j ƒ  |  _ | |  _ |  j d  k o i  |  _ n |  j j ƒ  |  _ | |  _ | |  _ |  j o› yD t j	 t
 |  j d ƒ ƒ \ } } } |  j |  j | | | ƒ ƒ Wq_t t t f k
 o; } z% t d |  j | f d t j ƒWYd  d  } ~ Xq_Xn d  S(   Nu   rbu   Skipping counts file %r: %su   file(   u   countsu   Noneu   copyu   counteru   calledfuncsu   callersu   infileu   outfileu   pickleu   loadu   openu   updateu	   __class__u   IOErroru   EOFErroru
   ValueErroru   printu   sysu   stderr(   u   selfu   countsu   calledfuncsu   infileu   callersu   outfileu   err(    (    u"   /mit/python/lib/python3.0/trace.pyu   __init__É   s*    					
$ c       	      C   s±   |  j  } |  j } |  j } | j  } | j } | j } x2 | j ƒ  D]$ } | j | d ƒ | | | | <qC Wx | j ƒ  D] } d | | <qx Wx | j ƒ  D] } d | | <q™ Wd S(   u.   Merge in the data from another CoverageResultsi    i   N(   u   countsu   calledfuncsu   callersu   keysu   get(	   u   selfu   otheru   countsu   calledfuncsu   callersu   other_countsu   other_calledfuncsu   other_callersu   key(    (    u"   /mit/python/lib/python3.0/trace.pyu   updateã   s    						 "  c             C   sþ  |  j  oR t ƒ  t d ƒ x> t t j ƒ  ƒ D]& \ } } } t d | | | f ƒ q. Wn |  j oÖ t ƒ  t d ƒ d } } x¸ t |  j j ƒ  ƒ D] \ \ }	 }
 } \ } } } |	 | k o' t ƒ  t d |	 d ƒ |	 } d } n | |	 k o$ | | k o t d | ƒ | } n t d |
 | | | f ƒ q— Wn i  } xN |  j j ƒ  D]= \ } } | j | i  ƒ } | | <|  j | | f | | <qRWi  } xy| j ƒ  D]k\ } } | d k o q¦n | j	 d	 ƒ o q¦n | j
 d ƒ o | d d … } n | d k o. t j j t j j | ƒ ƒ } t | ƒ } n7 | } t j j | ƒ p t j | ƒ n t | ƒ } | o t | ƒ } n i  } t j | ƒ } t j j | | d ƒ } |  j | | | | ƒ \ } } | o5 | o. t d | | ƒ } | | | | f | | <q¦q¦W| oZ | oS t d ƒ xF t | j ƒ  ƒ D]. } | | \ } } } } t d | | ƒ q@Wn |  j oz y5 t j |  j |  j  |  j f t |  j d ƒ d ƒ Wqút k
 o2 } z t d | d t j  ƒWYd d } ~ XqúXn d S(   u!   
        @param coverdir
        u   functions called:u*   filename: %s, modulename: %s, funcname: %su   calling relationships:u    u   ***u     -->u       %s.%s -> %s.%su   <string>u	   <doctest u   .pycu   .pyoNiÿÿÿÿu   .coverid   u   lines   cov%   module   (path)u   %5d   %3d%%   %s   (%s)u   wbi   u"   Can't save counts files because %su   file(   u   .pycu   .pyo(!   u   calledfuncsu   printu   sortedu   callsu   keysu   callersu   countsu   getu   itemsu
   startswithu   endswithu   Noneu   osu   pathu   dirnameu   abspathu   modnameu   existsu   makedirsu   fullmodnameu   find_executable_linenosu	   linecacheu   getlinesu   joinu   write_results_fileu   intu   outfileu   pickleu   dumpu   openu   IOErroru   sysu   stderr(   u   selfu   show_missingu   summaryu   coverdiru   filenameu
   modulenameu   funcnameu   lastfileu	   lastcfileu   pfileu   pmodu   pfuncu   cfileu   cmodu   cfuncu   per_fileu   linenou	   lines_hitu   sumsu   countu   diru   lnotabu   sourceu	   coverpathu   n_hitsu   n_linesu   percentu   mu   err(    (    u"   /mit/python/lib/python3.0/trace.pyu   write_resultsõ   s‚    

 


 

"  
 
c             C   s`  y t  | d ƒ } WnH t k
 o< } z& t d | | f d t j ƒd SWYd d } ~ Xn Xd } d } xß t | ƒ D]Ñ \ }	 }
 |	 d } | | k o- | j d | | ƒ | d 7} | d 7} nh t j |
 ƒ o | j d ƒ nG | | k o, t	 | |	 k o | j d	 ƒ | d 7} n | j d ƒ | j | |	 j
 d
 ƒ ƒ qw W| j ƒ  | | f S(   u'   Return a coverage results file in path.u   wu2   trace: Could not open %r for writing: %s- skippingu   filei    Ni   u   %5d: u          u   >>>>>> i   (   i    i    (   u   openu   IOErroru   printu   sysu   stderru	   enumerateu   writeu   rx_blanku   matchu   PRAGMA_NOCOVERu
   expandtabsu   close(   u   selfu   pathu   linesu   lnotabu	   lines_hitu   outfileu   erru   n_linesu   n_hitsu   iu   lineu   lineno(    (    u"   /mit/python/lib/python3.0/trace.pyu   write_results_fileJ  s0     


NTF(	   u   __name__u
   __module__u   Noneu   __init__u   updateu   Trueu   Falseu   write_resultsu   write_results_file(   u
   __locals__(    (    u"   /mit/python/lib/python3.0/trace.pyu   CoverageResultsÈ   s
   
		Uu   CoverageResultsc             C   s{   i  } d „  |  j  d d d … Dƒ } t | ƒ } d } |  j } x3 | D]+ } | | 7} | | k o d | | <qH qH W| S(   u:   Return dict where keys are lines in the line number table.c             S   s!   g  } |  ] } | t  | ƒ q
 S(    (   u   ord(   u   .0u   _[1]u   c(    (    u"   /mit/python/lib/python3.0/trace.pyu
   <listcomp>r  s    i   Ni   F(   u	   co_lnotabu   lenu   Falseu   co_firstlineno(   u   codeu   strsu   linenosu   line_incrementsu   table_lengthu	   docstringu   linenou   li(    (    u"   /mit/python/lib/python3.0/trace.pyu   find_lines_from_coden  s     	 
c             C   sT   t  |  | ƒ } x> |  j D]3 } t | t j ƒ o | j t | | ƒ ƒ q q W| S(   u<   Return lineno dict for all code objects reachable from code.(   u   find_lines_from_codeu	   co_constsu
   isinstanceu   typesu   CodeTypeu   updateu
   find_lines(   u   codeu   strsu   linenosu   c(    (    u"   /mit/python/lib/python3.0/trace.pyu
   find_lines~  s    
 c             C   sÃ   i  } t  j } t |  ƒ } x— t j | j ƒ D]ƒ \ } } } } } | t  j k oX | t  j k oD | \ }	 }
 | \ } } x) t |	 | d ƒ D] } d | | <q Wq« n | } q. W| j ƒ  | S(   uÄ   Return a dict of possible docstring positions.

    The dict maps line numbers to strings.  There is an entry for
    line that contains only a string or a part of a triple-quoted
    string.
    i   (	   u   tokenu   INDENTu   openu   tokenizeu   generate_tokensu   readlineu   STRINGu   rangeu   close(   u   filenameu   du
   prev_ttypeu   fu   ttypeu   tstru   startu   endu   lineu   slineu   scolu   elineu   ecolu   i(    (    u"   /mit/python/lib/python3.0/trace.pyu   find_stringsŠ  s    	  

c             C   s   y t  |  d ƒ j ƒ  } WnH t k
 o< } z& t d |  | f d t j ƒi  SWYd d } ~ Xn Xt | |  d ƒ } t |  ƒ } t | | ƒ S(   uA   Return dict where keys are line numbers in the line number table.u   rUu%   Not printing coverage data for %r: %su   fileNu   exec(	   u   openu   readu   IOErroru   printu   sysu   stderru   compileu   find_stringsu
   find_lines(   u   filenameu   progu   erru   codeu   strs(    (    u"   /mit/python/lib/python3.0/trace.pyu   find_executable_linenos¡  s    c          
   B   s›   |  Ee  Z d  d  d d d d d d d d „	 Z d „  Z d d d „ Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d S(   i   i    c
       
      C   s:  | |  _  | |  _ t | | ƒ |  _ i  |  _ i  |  _ i  |  _ d |  _ | |  _ i  |  _	 i  |  _
 i  |  _ d |  _ |	 o t j ƒ  |  _ n | o |  j |  _ n‘ | o |  j |  _ nz | o# | o |  j |  _ |  j |  _ nP | o |  j |  _ |  j |  _ n- | o |  j |  _ |  j |  _ n
 d |  _ d S(   ux  
        @param count true iff it should count number of times each
                     line is executed
        @param trace true iff it should print out each line that is
                     being counted
        @param countfuncs true iff it should just output a list of
                     (filename, modulename, funcname,) for functions
                     that were called at least once;  This overrides
                     `count' and `trace'
        @param ignoremods a list of the names of modules to ignore
        @param ignoredirs a list of the names of directories to ignore
                     all of the (recursive) contents of
        @param infile file from which to read stored counts to be
                     added into the results
        @param outfile file in which to write the results
        @param timing true iff timing information be displayed
        i    i   N(   u   infileu   outfileu   Ignoreu   ignoreu   countsu   blabbedu   pathtobasenameu	   donothingu   traceu   _calledfuncsu   _callersu   _caller_cacheu   Noneu
   start_timeu   timeu   globaltrace_trackcallersu   globaltraceu   globaltrace_countfuncsu   globaltrace_ltu   localtrace_trace_and_countu
   localtraceu   localtrace_traceu   localtrace_count(
   u   selfu   countu   traceu
   countfuncsu   countcallersu
   ignoremodsu
   ignoredirsu   infileu   outfileu   timing(    (    u"   /mit/python/lib/python3.0/trace.pyu   __init__®  s8    											c             C   s‡   d d  l  } | j } |  j p$ t j |  j ƒ t j |  j ƒ n z t | | | ƒ Wd  |  j p t j d  ƒ t j d  ƒ n Xd  S(   Ni    (	   u   __main__u   __dict__u	   donothingu   sysu   settraceu   globaltraceu	   threadingu   execu   None(   u   selfu   cmdu   __main__u   dict(    (    u"   /mit/python/lib/python3.0/trace.pyu   runá  s    	

c          
   C   s    | d  k o
 i  } n | d  k o
 i  } n |  j p$ t j |  j ƒ t j |  j ƒ n z t | | | ƒ Wd  |  j p t j d  ƒ t j d  ƒ n Xd  S(   N(   u   Noneu	   donothingu   sysu   settraceu   globaltraceu	   threadingu   exec(   u   selfu   cmdu   globalsu   locals(    (    u"   /mit/python/lib/python3.0/trace.pyu   runctxî  s     
 


c          	   O   sZ   d  } |  j p t j |  j ƒ n z | | | Ž  } Wd  |  j p t j d  ƒ n X| S(   N(   u   Noneu	   donothingu   sysu   settraceu   globaltrace(   u   selfu   funcu   argsu   kwu   result(    (    u"   /mit/python/lib/python3.0/trace.pyu   runfuncû  s    

c       
      C   s  | j  } | j } | o t | ƒ } n d  } | j } d  } | |  j k o) |  j | d  k	 o |  j | } q9nÃ d  |  j | <d „  t j | ƒ Dƒ } t | ƒ d k o‰ d „  t j | d ƒ Dƒ } t | ƒ d k oU d „  t j | d ƒ Dƒ }	 t |	 ƒ d k o! t	 |	 d ƒ } | |  j | <q5q9n | d  k	 o< | j
 d ƒ d d  … } d j | ƒ } d | | f } n | | | f S(   Nc             S   s/   g  } |  ]! } t  | d  ƒ o | | q
 q
 S(   u   __doc__(   u   hasattr(   u   .0u   _[1]u   f(    (    u"   /mit/python/lib/python3.0/trace.pyu
   <listcomp>  s    i   c             S   s/   g  } |  ]! } t  | t ƒ o | | q
 q
 S(    (   u
   isinstanceu   dict(   u   .0u   _[1]u   d(    (    u"   /mit/python/lib/python3.0/trace.pyu
   <listcomp>  s    i    c             S   s/   g  } |  ]! } t  | d  ƒ o | | q
 q
 S(   u	   __bases__(   u   hasattr(   u   .0u   _[1]u   c(    (    u"   /mit/python/lib/python3.0/trace.pyu
   <listcomp>   s    u   .u   %s.%s(   u   f_codeu   co_filenameu   modnameu   Noneu   co_nameu   _caller_cacheu   gcu   get_referrersu   lenu   stru   splitu   join(
   u   selfu   frameu   codeu   filenameu
   modulenameu   funcnameu   clsnameu   funcsu   dictsu   classes(    (    u"   /mit/python/lib/python3.0/trace.pyu   file_module_function_of  s0    			c             C   sI   | d k o8 |  j  | ƒ } |  j  | j ƒ } d |  j | | f <n d S(   uk   Handler for call events.

        Adds information about who called who to the self._callers dict.
        u   calli   N(   u   file_module_function_ofu   f_backu   _callers(   u   selfu   frameu   whyu   argu	   this_funcu   parent_func(    (    u"   /mit/python/lib/python3.0/trace.pyu   globaltrace_trackcallers3  s    c             C   s1   | d k o  |  j  | ƒ } d |  j | <n d S(   uo   Handler for call events.

        Adds (filename, modulename, funcname) to the self._calledfuncs dict.
        u   calli   N(   u   file_module_function_ofu   _calledfuncs(   u   selfu   frameu   whyu   argu	   this_func(    (    u"   /mit/python/lib/python3.0/trace.pyu   globaltrace_countfuncs>  s    c             C   s¨   | d k o— | j  } | j j d d ƒ } | oj t | ƒ } | d k	 oM |  j j | | ƒ } | p- |  j o t d | | j	 f ƒ n |  j
 Sq  q¤ d Sn d S(   u’   Handler for call events.

        If the code block being entered is to be ignored, returns `None',
        else returns self.localtrace.
        u   callu   __file__u!    --- modulename: %s, funcname: %sN(   u   f_codeu	   f_globalsu   getu   Noneu   modnameu   ignoreu   namesu   traceu   printu   co_nameu
   localtrace(   u   selfu   frameu   whyu   argu   codeu   filenameu
   modulenameu	   ignore_it(    (    u"   /mit/python/lib/python3.0/trace.pyu   globaltrace_ltG  s    	
c             C   sÃ   | d k o¯ | j  j } | j } | | f } |  j j | d ƒ d |  j | <|  j o% t d t j ƒ  |  j d d ƒn t j	 j
 | ƒ } t d | | t j | | ƒ f d d ƒn |  j S(   Nu   linei    i   u   %.2fu   endu    u
   %s(%d): %s(   u   f_codeu   co_filenameu   f_linenou   countsu   getu
   start_timeu   printu   timeu   osu   pathu   basenameu	   linecacheu   getlineu
   localtrace(   u   selfu   frameu   whyu   argu   filenameu   linenou   keyu   bname(    (    u"   /mit/python/lib/python3.0/trace.pyu   localtrace_trace_and_count^  s    	 
%!c             C   s—   | d k oƒ | j  j } | j } |  j o% t d t j ƒ  |  j d d ƒn t j j | ƒ } t d | | t	 j
 | | ƒ f d d ƒn |  j S(   Nu   lineu   %.2fu   endu    u
   %s(%d): %s(   u   f_codeu   co_filenameu   f_linenou
   start_timeu   printu   timeu   osu   pathu   basenameu	   linecacheu   getlineu
   localtrace(   u   selfu   frameu   whyu   argu   filenameu   linenou   bname(    (    u"   /mit/python/lib/python3.0/trace.pyu   localtrace_tracem  s    	
%!c             C   sY   | d k oE | j  j } | j } | | f } |  j j | d ƒ d |  j | <n |  j S(   Nu   linei    i   (   u   f_codeu   co_filenameu   f_linenou   countsu   getu
   localtrace(   u   selfu   frameu   whyu   argu   filenameu   linenou   key(    (    u"   /mit/python/lib/python3.0/trace.pyu   localtrace_countz  s    	$c          
   C   s1   t  |  j d |  j d |  j d |  j d |  j ƒS(   Nu   infileu   outfileu   calledfuncsu   callers(   u   CoverageResultsu   countsu   infileu   outfileu   _calledfuncsu   _callers(   u   self(    (    u"   /mit/python/lib/python3.0/trace.pyu   results‚  s    		N(    (    F(   u   __name__u
   __module__u   Noneu   Falseu   __init__u   runu   runctxu   runfuncu   file_module_function_ofu   globaltrace_trackcallersu   globaltrace_countfuncsu   globaltrace_ltu   localtrace_trace_and_countu   localtrace_traceu   localtrace_countu   results(   u
   __locals__(    (    u"   /mit/python/lib/python3.0/trace.pyu   Trace­  s   
1			-							u   Tracec             C   s2   t  j j d t  j d |  f ƒ t  j d ƒ d  S(   Nu   %s: %s
i    i   (   u   sysu   stderru   writeu   argvu   exit(   u   msg(    (    u"   /mit/python/lib/python3.0/trace.pyu	   _err_exitˆ  s    !c             C   s©  d d  l  } |  d  k o t j }  n yV | j  |  d d  … d d d d d d d	 d
 d d d d d d d d g ƒ \ } } Wns | j k
 od } zN t j j d t j d | f ƒ t j j d t j d ƒ t j d ƒ WYd  d  } ~ Xn Xd } d } d } d } d  }	 d }
 g  } g  } d  } d } dE } dE } dE } xA| D]9\ } } | d k o t	 t j
 ƒ t j d ƒ n | d k o! t j
 j d ƒ t j d ƒ n | d k p | d k o dF } qGn | d k p | d k o dF } qGn | d k p | d k o dF } qGn | d k p | d k o d } qGn | d  k p | d! k o d } qGn | d" k p | d# k o d } qGn | d$ k p | d% k o d } qGn | d& k p | d' k o | }	 qGn | d( k p | d) k o d }
 qGn | d* k p | d+ k o | } qGn | d, k p | d- k o d } qGn | d. k o4 x* | j d/ ƒ D] } | j | j ƒ  ƒ qvWqGn | d0 k oÅ x» | j t j ƒ D]§ } t j j | ƒ } | j d1 t j j t j d2 d3 t j d  d4 … ƒ ƒ } | j d5 t j j t j d2 d3 t j d  d4 … ƒ ƒ } t j j | ƒ } | j | ƒ qºWqGn d p t d6 ƒ ‚ qGW| o | p | o t d7 ƒ n | p | p | p | p | p t d8 ƒ n | o | o t d9 ƒ n | o |	 o t d: ƒ n | o! t | ƒ d k o t d; ƒ n | o2 t d< |	 d= |	 ƒ } | j |
 d
 | d> | ƒn4| t _ | d } t j j | ƒ d t j d <t | | d? | d@ | dA | dB | d< |	 d= |	 d | ƒ} yB t | ƒ } z | j  ƒ  } Wd  | j! ƒ  X| j" dC | f ƒ WnU t# k
 o6 } z  t dD t j d | f ƒ WYd  d  } ~ Xn t$ k
 o Yn X| j% ƒ  } | p | j |
 d
 | d> | ƒn d  S(G   Ni    i   u   tcrRf:d:msC:lTgu   helpu   versionu   traceu   countu   reportu	   no-reportu   summaryu   file=u   missingu   ignore-module=u   ignore-dir=u	   coverdir=u	   listfuncsu
   trackcallsu   timingu   %s: %s
u%   Try `%s --help' for more information
u   --helpu	   --versionu
   trace 2.0
u   -Tu   --trackcallsu   -lu   --listfuncsu   -gu   --timingu   -tu   --traceu   -cu   --countu   -ru   --reportu   -Ru   --no-reportu   -fu   --fileu   -mu	   --missingu   -Cu
   --coverdiru   -su	   --summaryu   --ignore-moduleu   ,u   --ignore-diru   $prefixu   libu   pythoni   u   $exec_prefixu   Should never get hereu8   cannot specify both --listfuncs and (--trace or --count)uL   must specify one of --trace, --count, --report, --listfuncs, or --trackcallsu,   cannot specify both --report and --no-reportu   --report requires a --fileu   missing name of file to runu   infileu   outfileu   coverdiru
   countfuncsu   countcallersu
   ignoremodsu
   ignoredirsu   exec(%r)u   Cannot run file %r because: %sFT(&   u   getoptu   Noneu   sysu   argvu   erroru   stderru   writeu   exitu   Falseu   usageu   stdoutu   Trueu   splitu   appendu   stripu   osu   pathsepu   pathu
   expandvarsu   replaceu   joinu   prefixu   versionu   exec_prefixu   normpathu   AssertionErroru	   _err_exitu   lenu   CoverageResultsu   write_resultsu   Traceu   openu   readu   closeu   runu   IOErroru
   SystemExitu   results(   u   argvu   getoptu   optsu	   prog_argvu   msgu   traceu   countu   reportu	   no_reportu   counts_fileu   missingu   ignore_modulesu   ignore_dirsu   coverdiru   summaryu	   listfuncsu   countcallersu   timingu   optu   valu   modu   su   resultsu   prognameu   tu   fpu   scriptu   err(    (    u"   /mit/python/lib/python3.0/trace.pyu   mainŒ  sô    	!!   		#	
.u   __main__(   u   __doc__u	   linecacheu   osu   reu   sysu	   threadingu   timeu   tokenu   tokenizeu   typesu   gcu   pickleu   usageu   PRAGMA_NOCOVERu   compileu   rx_blanku   Ignoreu   modnameu   fullmodnameu   CoverageResultsu   find_lines_from_codeu
   find_linesu   find_stringsu   find_executable_linenosu   Traceu	   _err_exitu   Noneu   mainu   __name__(    (    (    u"   /mit/python/lib/python3.0/trace.pyu   <module>1   s6   	-5		¦				Û	›