Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
3 N”ªj¢mã@sBdZddddddddd d d d d g ZddlZddlZddlZddlZ ddl Z ddl Z ddlmZddlZy ddlZWnek rŽddlZYnXejZe je jBe jBZee dƒr¼ee jOZeZee dƒrÔee jOZee dƒræe j Z ndZ dZ!eƒZ"ee dƒ�re j#Z$nee dƒ�re j%Z$ndd„Z$dd„Z&dd„Z'dd„Z(Gdd „d ƒZ)d!d"„Z*d#d$„Z+da,d%d&„Z-d'd(„Z.d)d*„Z/d+d,„Z0d-d „Z1d.d „Z2da3d/d „Z4d0d „Z5dDd2d„Z6dEd3d„Z7d4e!dfd5d„Z8Gd6d7„d7ƒZ9Gd8d9„d9ƒZ:dGd=d„Z;e jk�se j=j>d?k�r e;Z?nee d@ƒa@dIdAd„Z?GdBd„dƒZAGdCd„deBƒZCdS)Ja�Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. All of the interfaces provided by this module can be used without fear of race conditions except for 'mktemp'. 'mktemp' is subject to race conditions and should not be used; it is provided for backward compatibility only. The default path names are returned as str. If you supply bytes as input, all return values will be in bytes. Ex: >>> tempfile.mkstemp() (4, '/tmp/tmptpu9nin8') >>> tempfile.mkdtemp(suffix=b'') b'/tmp/tmppbi8f0hy' This module also provides some data items to the user: TMP_MAX - maximum number of names that will be tried before giving up. tempdir - If this is set to a string before the first use of any routine from this module, it will be considered as another candidate location to store temporary files. ÚNamedTemporaryFileÚ TemporaryFileÚSpooledTemporaryFileÚTemporaryDirectoryÚmkstempÚmkdtempÚmktempÚTMP_MAXÚ gettempprefixÚtempdirÚ gettempdirÚgettempprefixbÚ gettempdirbéN)ÚRandomÚ O_NOFOLLOWÚO_BINARYi'ZtmpÚlstatÚstatcCstj|tjƒ}tj|ƒdS)N)Ú_osÚopenÚO_RDONLYÚclose)ÚfnÚfd©rú /usr/lib64/python3.6/tempfile.pyÚ_statTsrc Cs*y t|ƒWntk r dSXdSdS)NFT)rÚOSError)rrrrÚ_existsXs  rcGs`d}xJ|D]B}|dkrq t|tƒr8|tkr2tdƒ‚t}q |tkrHtdƒ‚t}q W|dkr\tS|S)zBLook at the type of all args and divine their implied return type.Nz1Can't mix bytes and non-bytes in path components.)Ú isinstanceÚbytesÚstrÚ TypeError)ÚargsZ return_typeÚargrrrÚ_infer_return_typeas  r%cCsdt|||ƒ}|dkr|ƒ}|dkr:|tkr0t}n tjtƒ}|dkrX|tkrRtƒ}ntƒ}||||fS)z9Common parameter processing for most APIs in this module.N)r%r!ÚtemplaterÚfsencoder r )ÚprefixÚsuffixÚdirÚ output_typerrrÚ_sanitize_paramsvs  r,c@s0eZdZdZdZedd„ƒZdd„Zdd„Zd S) Ú_RandomNameSequencea,An instance of _RandomNameSequence generates an endless sequence of unpredictable strings which can safely be incorporated into file names. Each string is eight characters long. Multiple threads can safely use the same instance at the same time. _RandomNameSequence is an iterator.Z%abcdefghijklmnopqrstuvwxyz0123456789_cCs,tjƒ}|t|ddƒkr&tƒ|_||_|jS)NÚ_rng_pid)rÚgetpidÚgetattrÚ_RandomZ_rngr.)ÚselfZcur_pidrrrÚrng’s z_RandomNameSequence.rngcCs|S)Nr)r2rrrÚ__iter__šsz_RandomNameSequence.__iter__cs0|j‰|jj‰‡‡fdd„tdƒDƒ}dj|ƒS)Ncsg|] }ˆˆƒ‘qSrr)Ú.0Zdummy)ÚcÚchooserrú  sz0_RandomNameSequence.__next__..éÚ)Ú charactersr3ZchoiceÚrangeÚjoin)r2Zlettersr)r6r7rÚ__next__�sz_RandomNameSequence.__next__N) Ú__name__Ú __module__Ú __qualname__Ú__doc__r;Úpropertyr3r4r>rrrrr-ˆs  r-c Cs¨g}x$dD]}tj|ƒ}|r |j|ƒq Wtjdkr\|jtjjdƒtjjdƒddd d gƒn|jd d d gƒy|jtjƒƒWn$t t fk r¢|jtj ƒYnX|S)z[Generate a list of candidate temporary directories which _get_default_tempdir will try.ÚTMPDIRÚTEMPÚTMPÚntz~\AppData\Local\Tempz%SYSTEMROOT%\Tempzc:\tempzc:\tmpz\tempz\tmpz/tmpz/var/tmpz/usr/tmp)rDrErF) rÚgetenvÚappendÚnameÚextendÚpathÚ expanduserÚ expandvarsÚgetcwdÚAttributeErrorrÚcurdir)ÚdirlistZenvnameÚdirnamerrrÚ_candidate_tempdir_list£s    rTcCs4tƒ}tƒ}�x|D�]}|tjkr0tjj|ƒ}xêtdƒD]Þ}t|ƒ}tjj||ƒ}y\tj |t dƒ}zt k rªtj dkr¤tjj|ƒr¤tj|tjƒr¤w$n‚YnX| tjj|ƒfSWt tjdƒ‚dS)z>Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.i€rGz#No usable temporary file name foundN)rnr Úmaprr'r<rrYrLr=rr^r_rJr`rarbrXrdÚEEXIST) r*ZpreZsufÚflagsr+ÚnamesrfrJÚfilerrrrÚ_mkstemp_innerûs$ rtcGsJ|tjkr ||f|žddiŽn&tjdks8tjj|ƒ rF||f|žŽdS)NÚfollow_symlinksFrG)rÚsupports_follow_symlinksrJrLÚislink)ÚfuncrLr#rrrÚ_dont_follow_symlinkss ryc Cs>y tj}Wntk rYnXt||dƒttj|dƒdS)NriÀ)rÚchflagsrPryÚchmod)rLrzrrrÚ _resetpermss   r|cCstS)z-The default prefix for temporary directories.)r&rrrrr *scCs tjtƒƒS)z6The default prefix for temporary directories as bytes.)rr'r rrrrr .sc Cs2tdkr.tjƒztdkr tƒaWdtjƒXtS)zAccessor for tempfile.tempdir.N)r rkrlrirmrrrrr 4s  cCs tjtƒƒS)z)A bytes version of tempfile.gettempdir().)rr'r rrrrr @sFcCs2t|||ƒ\}}}}|rt}nt}t|||||ƒS)aÆUser-callable function to create and return a unique temporary file. The return value is a pair (fd, name) where fd is the file descriptor returned by os.open, and name is the filename. If 'suffix' is not None, the file name will end with that suffix, otherwise there will be no suffix. If 'prefix' is not None, the file name will begin with that prefix, otherwise a default prefix is used. If 'dir' is not None, the file will be created in that directory, otherwise a default directory is used. If 'text' is specified and true, the file is opened in text mode. Else (the default) the file is opened in binary mode. On some operating systems, this makes no difference. If any of 'suffix', 'prefix' and 'dir' are not None, they must be the same type. If they are bytes, the returned name will be bytes; str otherwise. The file is readable and writable only by the creating user ID. If the operating system uses permission bits to indicate whether a file is executable, the file is executable by no one. The file descriptor is not inherited by children of this process. Caller is responsible for deleting the file when done with it. )r,Ú_text_openflagsrZrt)r)r(r*Útextr+rqrrrrDs c CsÔt|||ƒ\}}}}tƒ}|tkr.ttj|ƒ}x”ttƒD]ˆ}t|ƒ}tj j ||||ƒ}ytj |dƒWnRt k r€w8Yn>t k r¼tjdkr¶tj j|ƒr¶tj|tjƒr¶w8n‚YnX|SWt tjdƒ‚dS)aUser-callable function to create and return a unique temporary directory. The return value is the pathname of the directory. Arguments are as for mkstemp, except that the 'text' argument is not accepted. The directory is readable, writable, and searchable only by the creating user. Caller is responsible for deleting the directory when done with it. iÀrGz(No usable temporary directory name foundN)r,rnr rorr'r<rrYrLr=Úmkdirr^r_rJr`rarbrdrp)r)r(r*r+rrrfrJrsrrrrls&  r:cCs`|dkrtƒ}tƒ}x:ttƒD].}t|ƒ}tjj||||ƒ}t|ƒs|SqWt t j dƒ‚dS)aêUser-callable function to return a unique temporary file name. The file is not created. Arguments are similar to mkstemp, except that the 'text' argument is not accepted, and suffix=None, prefix=None and bytes file names are not supported. THIS FUNCTION IS UNSAFE AND SHOULD NOT BE USED. The file name may refer to a file that did not exist at some point, but by the time you get around to creating it, someone else may have beaten you to the punch. Nz"No usable temporary filename found) r rnr<rrYrrLr=rr^rdrp)r)r(r*rrrfrJrsrrrr“sc@sLeZdZdZdZdZd dd„Zejdkr@ej fdd „Z d d „Z nd d „Z dS)Ú_TemporaryFileCloserz–A separate object allowing proper closing of a temporary file's underlying file object, without adding a __del__ method to the temporary file.NFTcCs||_||_||_dS)N)rsrJÚdelete)r2rsrJr�rrrÚ__init__»sz_TemporaryFileCloser.__init__rGc Cs>|j r:|jdk r:d|_z|jjƒWd|jr8||jƒXdS)NT)Ú close_calledrsrr�rJ)r2r]rrrrÊs z_TemporaryFileCloser.closecCs |jƒdS)N)r)r2rrrÚ__del__Ôsz_TemporaryFileCloser.__del__cCs|jsd|_|jjƒdS)NT)rƒrsr)r2rrrrØs)T) r?r@rArBrsrƒr‚rrJr]rr„rrrrr€³s   r€c@sBeZdZdZddd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dS)Ú_TemporaryFileWrapperzÄ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. TcCs$||_||_||_t|||ƒ|_dS)N)rsrJr�r€Ú_closer)r2rsrJr�rrrr‚æsz_TemporaryFileWrapper.__init__cs^|jd}t||ƒ}t|dƒrD|‰tjˆƒ‡fdd„ƒ}|j|_|}t|tƒsZt|||ƒ|S)NrsÚ__call__cs ˆ||ŽS)Nr)r#Úkwargs)rxrrÚ func_wrapperôsz7_TemporaryFileWrapper.__getattr__..func_wrapper) Ú__dict__r0ÚhasattrÚ _functoolsÚwrapsr†rÚintÚsetattr)r2rJrsÚar‰r)rxrÚ __getattr__ìs     z!_TemporaryFileWrapper.__getattr__cCs|jjƒ|S)N)rsÚ __enter__)r2rrrr’s z_TemporaryFileWrapper.__enter__cCs|jj|||ƒ}|jƒ|S)N)rsÚ__exit__r)r2ÚexcÚvalueÚtbÚresultrrrr“sz_TemporaryFileWrapper.__exit__cCs|jjƒdS)zA Close the temporary file, possibly deleting it. N)r†r)r2rrrr sz_TemporaryFileWrapper.closeccsx|jD] }|VqWdS)N)rs)r2Úlinerrrr4s z_TemporaryFileWrapper.__iter__N)T) r?r@rArBr‚r‘r’r“rr4rrrrr…Þs r…úw+béTc Cs”t|||ƒ\}}}}t} tjdkr0|r0| tjO} t|||| |ƒ\} } y tj| ||||d�} t| | |ƒSt k rŽtj | ƒtj | ƒ‚YnXdS)aÁCreate and return a temporary file. Arguments: 'prefix', 'suffix', 'dir' -- as for mkstemp. 'mode' -- the mode argument to io.open (default "w+b"). 'buffering' -- the buffer size argument to io.open (default -1). 'encoding' -- the encoding argument to io.open (default None) 'newline' -- the newline argument to io.open (default None) 'delete' -- whether the file is deleted on close (default True). The file is created as mkstemp() would do it. Returns an object with a file-like interface; the name of the file is accessible as its 'name' attribute. The file will be automatically deleted when it is closed unless the 'delete' argument is set to False. rG)Ú bufferingÚnewlineÚencodingN) r,rZrrJZ O_TEMPORARYrtr[rr…Ú BaseExceptionr]r) Úmoder›r�rœr)r(r*r�r+rqrrJrsrrrrs      ÚposixÚcygwinÚ O_TMPFILEc Csêt|||ƒ\}}}}t}tršy$|tjBtj@} tj|| dƒ} Wn*tk rXdaYnBtk rjYn0Xyt j| ||||d�Stj | ƒ‚YnXt |||||ƒ\} } ytj | ƒt j| ||||d�Stj | ƒ‚YnXdS)a>Create and return a temporary file. Arguments: 'prefix', 'suffix', 'dir' -- as for mkstemp. 'mode' -- the mode argument to io.open (default "w+b"). 'buffering' -- the buffer size argument to io.open (default -1). 'encoding' -- the encoding argument to io.open (default None) 'newline' -- the newline argument to io.open (default None) The file is created as mkstemp() would do it. Returns an object with a file-like interface. The file has no name, and will cease to exist when it is closed. i€F)r›rœr�N) r,rZÚ_O_TMPFILE_WORKSrr¢ÚO_CREATrÚIsADirectoryErrorrr[rrtr]) rŸr›r�rœr)r(r*r+rqZflags2rrJrrrrNs0       c@sðeZdZdZdZd8dd„Zd d „Zd d „Zd d„Zdd„Z dd„Z dd„Z e dd„ƒZ e dd„ƒZdd„Zdd„Zdd„Ze dd „ƒZe d!d"„ƒZe d#d$„ƒZd%d&„Zd'd(„Zd)d*„Zd+d,„Ze d-d.„ƒZd/d0„Zd9d1d2„Zd3d4„Zd5d6„ZdS):rz�Temporary file wrapper, specialized to switch from BytesIO or StringIO to a real file when it exceeds a certain size or when a fileno is needed. Frúw+bršNc CsHd|krtjƒ|_ntjdd�|_||_d|_|||||||dœ|_dS)NÚbÚ )rœF)rŸr›r)r(r�rœr*)r[ÚBytesIOÚ_fileÚStringIOÚ _max_sizeÚ_rolledÚ_TemporaryFileArgs) r2Úmax_sizerŸr›r�rœr)r(r*rrrr‚�s zSpooledTemporaryFile.__init__cCs,|jr dS|j}|r(|jƒ|kr(|jƒdS)N)r­r¬ÚtellÚrollover)r2rsr¯rrrÚ_check s zSpooledTemporaryFile._checkcCsN|jr dS|j}tf|jŽ}|_|`|j|jƒƒ|j|jƒdƒd|_dS)NrT)r­rªrr®r\ÚgetvalueÚseekr°)r2rsZnewfilerrrr±¦szSpooledTemporaryFile.rollovercCs|jjrtdƒ‚|S)Nz%Cannot enter context with closed file)rªÚclosedÚ ValueError)r2rrrr’·szSpooledTemporaryFile.__enter__cCs|jjƒdS)N)rªr)r2r”r•r–rrrr“¼szSpooledTemporaryFile.__exit__cCs |jjƒS)N)rªr4)r2rrrr4ÀszSpooledTemporaryFile.__iter__cCs|jjƒdS)N)rªr)r2rrrrÃszSpooledTemporaryFile.closecCs|jjS)N)rªrµ)r2rrrrµÆszSpooledTemporaryFile.closedc Cs8y|jjStk r2d|jdkr(‚|jdSXdS)Nr§rŸr�)rªr�rPr®)r2rrrr�Ês zSpooledTemporaryFile.encodingcCs|jƒ|jjƒS)N)r±rªÚfileno)r2rrrr·ÓszSpooledTemporaryFile.filenocCs|jjƒdS)N)rªÚflush)r2rrrr¸×szSpooledTemporaryFile.flushcCs |jjƒS)N)rªÚisatty)r2rrrr¹ÚszSpooledTemporaryFile.isattyc Cs(y|jjStk r"|jdSXdS)NrŸ)rªrŸrPr®)r2rrrrŸÝszSpooledTemporaryFile.modec Cs"y|jjStk rdSXdS)N)rªrJrP)r2rrrrJäszSpooledTemporaryFile.namec Cs8y|jjStk r2d|jdkr(‚|jdSXdS)Nr§rŸrœ)rªÚnewlinesrPr®)r2rrrrºës zSpooledTemporaryFile.newlinescGs |jj|ŽS)N)rªÚread)r2r#rrrr»ôszSpooledTemporaryFile.readcGs |jj|ŽS)N)rªÚreadline)r2r#rrrr¼÷szSpooledTemporaryFile.readlinecGs |jj|ŽS)N)rªÚ readlines)r2r#rrrr½úszSpooledTemporaryFile.readlinescGs|jj|ŽdS)N)rªr´)r2r#rrrr´ýszSpooledTemporaryFile.seekcCs|jjS)N)rªÚ softspace)r2rrrr¾szSpooledTemporaryFile.softspacecCs |jjƒS)N)rªr°)r2rrrr°szSpooledTemporaryFile.tellcCs6|dkr|jjƒn||jkr&|jƒ|jj|ƒdS)N)rªÚtruncater¬r±)r2Úsizerrrr¿s   zSpooledTemporaryFile.truncatecCs|j}|j|ƒ}|j|ƒ|S)N)rªr\r²)r2ÚsrsÚrvrrrr\s  zSpooledTemporaryFile.writecCs|j}|j|ƒ}|j|ƒ|S)N)rªÚ writelinesr²)r2ÚiterablersrÂrrrrÃs  zSpooledTemporaryFile.writelineséÿÿÿÿ)rr¦rÅNNNNN)N)r?r@rArBr­r‚r²r±r’r“r4rrCrµr�r·r¸r¹rŸrJrºr»r¼r½r´r¾r°r¿r\rÃrrrrrˆs8        c@sReZdZdZddd„Zedd„ƒZedd„ƒZd d „Zd d „Z d d„Z dd„Z dS)ra+Create and return a temporary directory. This has the same behavior as mkdtemp but can be used as a context manager. For example: with TemporaryDirectory() as tmpdir: ... Upon exiting the context, the directory and everything contained in it are removed. NcCs0t|||ƒ|_tj||j|jdj|ƒd�|_dS)NzImplicitly cleaning up {!r})Ú warn_message)rrJÚ_weakrefÚfinalizeÚ_cleanupÚformatÚ _finalizer)r2r)r(r*rrrr‚(s zTemporaryDirectory.__init__cs ‡‡fdd„}tjˆ|d�dS)Ncs’t|dtƒr|yV|ˆkr(ttjj|ƒƒt|ƒytj|ƒWn"ttfk r`ˆj|ƒYnXWqŽt k rxYqŽXnt|dt ƒrŒn‚dS)Nr) Ú issubclassr_r|rrLrSr]r¥Ú_rmtreerc)rxrLÚexc_info)ÚclsrJrrÚonerror0sz+TemporaryDirectory._rmtree..onerror)rÐ)Ú_shutilZrmtree)rÏrJrÐr)rÏrJrrÍ.szTemporaryDirectory._rmtreecCs|j|ƒtj|tƒdS)N)rÍÚ _warningsÚwarnÚResourceWarning)rÏrJrÆrrrrÉEs zTemporaryDirectory._cleanupcCsdj|jj|jƒS)Nz <{} {!r}>)rÊÚ __class__r?rJ)r2rrrÚ__repr__JszTemporaryDirectory.__repr__cCs|jS)N)rJ)r2rrrr’MszTemporaryDirectory.__enter__cCs |jƒdS)N)Úcleanup)r2r”r•r–rrrr“PszTemporaryDirectory.__exit__cCs|jjƒr|j|jƒdS)N)rËÚdetachrÍrJ)r2rrrr×Ss zTemporaryDirectory.cleanup)NNN) r?r@rArBr‚Ú classmethodrÍrÉrÖr’r“r×rrrrrs    )NNNF)NNNrÅ)r™rÅNNNNNTrÅ)r™rÅNNNNN)DrBÚ__all__Ú functoolsrŒÚwarningsrÒÚior[ÚosrZshutilrÑÚerrnordZrandomrr1ÚweakrefrÇÚ_threadÚ ImportErrorZ _dummy_threadÚ allocate_lockZ_allocate_lockÚO_RDWRr¤ÚO_EXCLr}r‹rrZrrr&rkrrrrr%r,r-rTrirjrnrtryr|r r r r r rrrr€r…rrJÚsysÚplatformrr£rÚobjectrrrrrÚsŠ          -   ( ' +? $  8