;ò
îŒü?c           @   s^   d  Z  d k Z d k Z d d d g Z d „  Z h  a d „  Z d „  Z d „  Z d	 „  Z	 d S(
   sµ   Cache lines from files.

This is intended to read lines from modules imported -- hence if a filename
is not found, it will look down the module search path for a file by
that name.
Ns   getlines
   clearcaches
   checkcachec         C   sH   t  |  ƒ } d | j o t | ƒ j n o | | d Sn d Sd  S(   Ni   s    (   s   getliness   filenames   liness   linenos   len(   s   filenames   linenos   lines(    (    s&   /mit/python/lib/python2.3/linecache.pys   getline   s    $c           C   s
   h  a  d S(   s   Clear the cache entirely.N(   s   cache(    (    (    s&   /mit/python/lib/python2.3/linecache.pys
   clearcache   s      c         C   s+   |  t j o t |  d Sn t |  ƒ Sd S(   ss   Get the lines for a file from the cache.
    Update the cache if it doesn't contain an entry for this file already.i   N(   s   filenames   caches   updatecache(   s   filename(    (    s&   /mit/python/lib/python2.3/linecache.pys   getlines!   s     c          C   s’   x‹ t  i ƒ  D]} } t  | \ } } } } y t i | ƒ }  Wn  t i	 j
 o t  | =q n X| |  i
 j p | |  i j o t  | =q q Wd S(   sU   Discard cache entries that are out of date.
    (This is not checked upon each call!)N(   s   caches   keyss   filenames   sizes   mtimes   liness   fullnames   oss   stats   errors   st_sizes   st_mtime(   s   stats   liness   filenames   mtimes   fullnames   size(    (    s&   /mit/python/lib/python2.3/linecache.pys
   checkcache+   s       c   
      C   s€  |  t j o t |  =n |  p |  d |  d d j o g  Sn |  } y t i | ƒ } Wn¨ t i j
 o™ } t i i |  ƒ d } x| t
 i D]h } y t i i | | ƒ } Wn t t f j
 o q Xy t i | ƒ } PWq t i j
 o q Xq Wg  Sn Xy) t | d ƒ } | i ƒ  } | i ƒ  Wn t j
 o } g  Sn X| i | i f \ }	 } |	 | | | f t |  <| Sd S(   s”   Update a cache entry and return its list of lines.
    If something's wrong, print a message, discard the cache entry,
    and return an empty list.i    iÿÿÿÿs   <>i   s   rUN(   s   filenames   caches   fullnames   oss   stats   errors   msgs   paths   splits   basenames   syss   dirnames   joins	   TypeErrors   AttributeErrors   opens   fps	   readliness   liness   closes   IOErrors   st_sizes   st_mtimes   sizes   mtime(
   s   filenames   fps   stats   basenames   liness   mtimes   msgs   fullnames   dirnames   size(    (    s&   /mit/python/lib/python2.3/linecache.pys   updatecache:   s>     !
 			(
   s   __doc__s   syss   oss   __all__s   getlines   caches
   clearcaches   getliness
   checkcaches   updatecache(   s   updatecaches
   clearcaches   __all__s
   checkcaches   syss   getliness   oss   getline(    (    s&   /mit/python/lib/python2.3/linecache.pys   ?   s   			
		
	