ฦ
N๖9c       s     d  Z    d k Z  e Z  e Z  d   Z J e Z L d   Z a d Z d d d  Z	 p d f  d     YZ
  d
 d d d	  Z d S(   s   Temporary files and filenames.Nc     sa      t  t j	 o  t  Sn  y  t i   }  Wn+  t t i f j
 o  t i }  n X d d d |  g }  t i	 d j o*  | i
 d d   | i
 d d  nฎ  t i	 d j o  d	 k } d	 k }   y_ ! | i | i " | i d
  \ } } # | i | | d f  i   } $ | i
 d |  Wn % | i j
 o
 & n Xn ' xP d d d f d ' r: } ( t i i |  o ) | i
 d t i |  n q|W* t   d } + xU| d + rH}	 , y#- t i i |	 |  }
 . t i	 d j oจ / y- 0 t i |
 t i t i  Bt i! Bd  } Wn 1 t# j
 o
 2 nZ X4 t i$ | d  } 5 | i& d  6 | i'   7 t i( |
  8 ~ ~ 9 |	 a  : PnM < t |
 d  } = | i& d  > | i'   ? t i( |
  @ |	 a  A PWn B t) j
 o
 C n XqูWD t  t j o E d | } F t) |  n G t  Sd	 S(   s+   Function to calculate the directory to use.s   /var/tmps   /usr/tmps   /tmps   nti    s   C:\TEMPs   \TEMPs   macNi   s    s   TMPDIRs   TEMPs   TMPs   tests   posixiภ  s   ws   blats0   Can't find a usable temporary directory amongst (+   s   tempdirs   Nones   oss   getcwds   pwds   AttributeErrors   errors   curdirs
   attempdirss   names   inserts   macfss   MACFSs
   FindFolders   kOnSystemDisks   kTemporaryFolderTypes   refnums   dirids   FSSpecs   as_pathnames   dirnames   envnames   environs   has_keys   gettempprefixs   testfiles   dirs   paths   joins   filenames   opens   O_RDWRs   O_CREATs   O_EXCLs   fds   OSErrors   fdopens   fps   writes   closes   unlinks   IOErrors   msg(   s   pwds
   attempdirss   macfss   MACFSs   refnums   dirids   dirnames   envnames   testfiles   dirs   filenames   fds   fps   msgs%   /mit/python/lib/python2.0/tempfile.pys
   gettempdir sl   ! 	" 	-			c      s๒   L M N O t  i d j o t o t t  i   j o Q t a n R t t j o S t  i d j o% T t  i   a U d t d a nY V t  i d j o W d t  i   d a n* X t  i d j o Y d a n
 [ d	 a n \ t Sd
 S(   s6   Function to calculate a prefix of the filename to use.s   posixs   @s   .s   nts   ~s   -s   macs   Python-Tmp-s   tmpN(   s   oss   names   _pids   getpids   Nones   template(    s%   /mit/python/lib/python2.0/tempfile.pys   gettempprefixL s   -i    c    s   d e f g t    } h t   } i x_ i d oT j t d a k t i i | | t |   } l t i i
 |  o m | Sn q' Wd S(   s>   User-callable function to return a unique temporary file name.i   N(   s
   gettempdirs   dirs   gettempprefixs   pres   counters   oss   paths   joins   suffixs   files   exists(   s   suffixs   dirs   pres   files%   /mit/python/lib/python2.0/tempfile.pys   mktempd s    
!s    s   TemporaryFileWrapperc      s>   p d  Z  v w d   Z { d   Z  d   Z  d   Z RS(   sร   Temporary file wrapper

    This class provides a wrapper around files opened for temporary use.
    In particular, it seeks to automatically remove the file when it is
    no longer needed.
    c    s   w x | |  _  y | |  _ d  S(   N(   s   files   selfs   path(   s   selfs   files   paths%   /mit/python/lib/python2.0/tempfile.pys   __init__w s   c    s*   { | |  i i   } t i |  i  d  S(   N(   s   selfs   files   closes   oss   unlinks   path(   s   selfs%   /mit/python/lib/python2.0/tempfile.pys   close{ s   c    s+     y  |  i   Wn   n Xd  S(   N(   s   selfs   close(   s   selfs%   /mit/python/lib/python2.0/tempfile.pys   __del__ s     c    sc     |  i d }  t | |  }  t |  t d  j o  t |  | |  n  | Sd  S(   Ns   filei    (   s   selfs   __dict__s   files   getattrs   names   as   types   setattr(   s   selfs   names   files   as%   /mit/python/lib/python2.0/tempfile.pys   __getattr__ s
   (   s   __doc__s   __init__s   closes   __del__s   __getattr__(    s%   /mit/python/lib/python2.0/tempfile.pys   TemporaryFileWrapperp s
   	c    sฮ      t  |  }  t i d j o}  t i | t i t i Bt i Bd  }  y*  t i	 |   t i
 | |  |  SWn    t i |     n Xn&  t | |  |  }  t | |  Sd S(   sB   Create and return a temporary file (opened read-write by default).s   posixiภ  N(   s   mktemps   suffixs   names   oss   opens   O_RDWRs   O_CREATs   O_EXCLs   fds   unlinks   fdopens   modes   bufsizes   closes   files   TemporaryFileWrapper(   s   modes   bufsizes   suffixs   names   fds   files%   /mit/python/lib/python2.0/tempfile.pys   TemporaryFile s   )s   w+bi   (   s   __doc__s   oss   Nones   tempdirs   templates
   gettempdirs   _pids   gettempprefixs   counters   mktemps   TemporaryFileWrappers   TemporaryFile(    s%   /mit/python/lib/python2.0/tempfile.pys   ? s   		9		