ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ 3 ^ d{|@sdZddddddddd d d d d g ZddlZddlZddlZddlZ yddl Z e j Z Wnpek rddlZddlZddZddZe je je je jhe jkoe je jkoe je jkZdFddZ YnXddlZddlm Z!ddl"Z#y ddl$Z$Wnek r ddl%Z$YnXe$j&Z'e j(e j)Be j*BZ+e,e drda?d2d Z@d3d ZAdGd4dZBdHd5dZCd6e1dfd7dZDGd8d9d9ZEGd:d;d;ZFdJd?dZGe jHd@ksze jjIdAkreGZJne,e dBaKdLdCdZJGdDddZLGdEddeMZNdS)MaTemporary 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 TemporaryFileSpooledTemporaryFileTemporaryDirectorymkstempmkdtempmktempTMP_MAX gettempprefixtempdir gettempdirgettempprefixb gettempdirbNc$CsLytjj|rtdWn(tk r@|tjj|tjdSXg}ytj|}Wn&tk rz|tj|tjYnXx|D]}tjj||}ytj|j }Wntk rd}YnXt j |rt ||qytj |Wqtk r |tj |tjYqXqWytj|Wn(tk rF|tj|tjYnXdS)Nz%Cannot call rmtree on a symbolic linkr)_ospathislinkOSError_sysexc_infolistdirjoinlstatst_mode_statS_ISDIR_rmtree_unsafeunlinkrmdir)ronerrornamesnamefullnamemoder#/usr/lib/python3.6/tempfile.pyr2s6      rc 0Csg}ytj|}Wn:tk rL}z||_|tj|tjWYdd}~XnXx|D]x}tjj||}ytj||dd}|j }Wntk rd}YnXt j |rytj |tj |d} Wn&tk r|tj |tjYnXztjj|tj| rJt| ||ytj||dWn(tk rF|tj|tjYnXn8y tdWn*tk r|tjj|tjYnXWdtj| XqVytj||dWqVtk r|tj|tjYqVXqVWdS)NF)dir_fdfollow_symlinksr)r%z%Cannot call rmtree on a symbolic link)rrrfilenamerrrrstatrrropenO_RDONLYsamestatfstat_rmtree_safe_fdrrcloser) topfdrrrerrr r!orig_str"dirfdr#r#r$r-SsD$     r-Fc!Cs^|rdd}n|dkrdd}trPt|tr8tj|}ytj|}Wn&tk rl|tj|tjdSXytj |tj }Wn&tk r|tj|tjdSXztj j |tj |rt|||ytj|Wn(tk r|tj|tjYnXn8y tdWn*tk r<|tj j|tjYnXWdtj|Xn t||SdS)aRecursively delete a directory tree. If ignore_errors is set, errors are ignored; otherwise, if onerror is set, it is called to handle the error with arguments (func, path, exc_info) where func is platform and implementation dependent; path is the argument to that function that caused it to fail; and exc_info is a tuple returned by sys.exc_info(). If ignore_errors is false and onerror is None, an exception is raised. cWsdS)Nr#)argsr#r#r$rsz_rmtree..onerrorNcWsdS)Nr#)r3r#r#r$rsz%Cannot call rmtree on a symbolic link)_use_fd_functions isinstancebytesrfsdecoder Exceptionrrr)r*rr+r,r-rrrr.r)r ignore_errorsrr1fdr#r#r$_rmtrees<      r;)Random O_NOFOLLOWO_BINARYi'Ztmprr(cCstj|tj}tj|dS)N)rr)r*r.)fnr:r#r#r$rsrc Cs*y t|Wntk r dSXdSdS)NFT)rr)r?r#r#r$_existss  r@cGs`d}xJ|D]B}|dkrq t|tr8|tkr2tdt}q |tkrHtdt}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.)r5r6str TypeError)r3Z return_typeargr#r#r$_infer_return_types  rDcCsdt|||}|dkr|}|dkr:|tkr0t}n tjt}|dkrX|tkrRt}nt}||||fS)z9Common parameter processing for most APIs in this module.N)rDrAtemplaterfsencoder r )prefixsuffixdir output_typer#r#r$_sanitize_paramss  rKc@s0eZdZdZdZeddZddZddZd 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|ddkr&t|_||_|jS)N_rng_pid)rgetpidgetattr_RandomZ_rngrM)selfZcur_pidr#r#r$rngs z_RandomNameSequence.rngcCs|S)Nr#)rQr#r#r$__iter__%sz_RandomNameSequence.__iter__cs0|j|jjfddtdD}dj|S)Ncsg|] }qSr#r#).0Zdummy)cchooser#r$ +sz0_RandomNameSequence.__next__..) charactersrRZchoiceranger)rQZlettersr#)rUrVr$__next__(sz_RandomNameSequence.__next__N) __name__ __module__ __qualname____doc__rZpropertyrRrSr\r#r#r#r$rLs  rLc Csg}x$dD]}tj|}|r |j|q Wtjdkr\|jtjjdtjjdddd d gn|jd d d gy|jtjWn$t t fk r|jtj YnX|S)z[Generate a list of candidate temporary directories which _get_default_tempdir will try.TMPDIRTEMPTMPntz~\AppData\Local\Tempz%SYSTEMROOT%\Tempzc:\tempzc:\tmpz\tempz\tmpz/tmpz/var/tmpz/usr/tmp)rbrcrd) rgetenvappendr extendr expanduser expandvarsgetcwdAttributeErrorrcurdir)dirlistZenvnamedirnamer#r#r$_candidate_tempdir_list.s    rpcCs4t}t}x|D]}|tjkr0tjj|}xtdD]}t|}tjj||}y\tj |t d}zt k rtj dkrtjj|rtj|tjrw$nYnX| tjj|fSWt tjddS)z>Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.irez#No usable temporary file name foundN)rr6maprrFr[rrurrr)ryrzr r{r|r}rtrEEXIST) rIZpreZsufflagsrJrrr filer:r#r#r$_mkstemp_inners$ rcCstS)z-The default prefix for temporary directories.)rEr#r#r#r$r scCs tjtS)z6The default prefix for temporary directories as bytes.)rrFr r#r#r#r$r sc Cs2tdkr.tjztdkr taWdtjXtS)zAccessor for tempfile.tempdir.N)r rrrrr#r#r#r$r s  cCs tjtS)z)A bytes version of tempfile.gettempdir().)rrFr r#r#r#r$r scCs2t|||\}}}}|rt}nt}t|||||S)aUser-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. )rK_text_openflagsrvr)rHrGrItextrJrr#r#r$rs c Cst|||\}}}}t}|tkr.ttj|}xttD]}t|}tj j ||||}ytj |dWnRt k rw8Yn>t k rtjdkrtj j|rtj|tjrw8nYnX|SWt tjddS)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. irez(No usable temporary directory name foundN)rKrr6rrrFr[rrurrmkdirryrzr r{r|r}rr)rHrGrIrJrrr rr#r#r$rs&  rYcCs`|dkrt}t}x:ttD].}t|}tjj||||}t|s|SqWt t j ddS)aUser-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 rr[rrurrrr@ryrr)rHrGrIrrr rr#r#r$r sc@sLeZdZdZdZdZd ddZejdkr@ej fdd Z d d Z nd d Z dS)_TemporaryFileCloserzA 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)rr delete)rQrr rr#r#r$__init__5sz_TemporaryFileCloser.__init__rec Cs>|j r:|jdk r:d|_z|jjWd|jr8||jXdS)NT) close_calledrr.rr )rQrr#r#r$r.Ds z_TemporaryFileCloser.closecCs |jdS)N)r.)rQr#r#r$__del__Nsz_TemporaryFileCloser.__del__cCs|jsd|_|jjdS)NT)rrr.)rQr#r#r$r.Rs)T) r]r^r_r`rrrrr rr.rr#r#r#r$r-s   rc@sBeZdZdZdddZddZddZd d Zd d Zd dZ dS)_TemporaryFileWrapperzTemporary 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)rr rr_closer)rQrr rr#r#r$r`sz_TemporaryFileWrapper.__init__cs^|jd}t||}t|drD|tjfdd}|j|_|}t|tsZt||||S)Nr__call__cs ||S)Nr#)r3kwargs)funcr#r$ func_wrappernsz7_TemporaryFileWrapper.__getattr__..func_wrapper) __dict__rOhasattr _functoolswrapsrr5intsetattr)rQr rarr#)rr$ __getattr__fs     z!_TemporaryFileWrapper.__getattr__cCs|jj|S)N)r __enter__)rQr#r#r$r{s z_TemporaryFileWrapper.__enter__cCs|jj|||}|j|S)N)r__exit__r.)rQexcvaluetbresultr#r#r$rsz_TemporaryFileWrapper.__exit__cCs|jjdS)zA Close the temporary file, possibly deleting it. N)rr.)rQr#r#r$r.sz_TemporaryFileWrapper.closeccsx|jD] }|VqWdS)N)r)rQliner#r#r$rSs z_TemporaryFileWrapper.__iter__N)T) r]r^r_r`rrrrr.rSr#r#r#r$rXs rw+bTc Cst|||\}}}}t} tjdkr0|r0| tjO} t|||| |\} } y tj| ||||d} t| | |St k rtj | tj | YnXdS)aCreate 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. re) bufferingnewlineencodingN) rKrvrr Z O_TEMPORARYrrwr)r BaseExceptionrr.) r"rrrrHrGrIrrJrr:r rr#r#r$rs      posixcygwin O_TMPFILEc Cst|||\}}}}t}try$|tjBtj@} tj|| d} Wn*tk rXdaYnBtk rjYn0Xyt j| ||||dStj | YnXt |||||\} } ytj | t j| ||||dStj | 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. iF)rrrN) rKrv_O_TMPFILE_WORKSrrO_CREATr)IsADirectoryErrorrrwr.rr) r"rrrrHrGrIrJrZflags2r:r r#r#r$rs0       c@seZdZdZdZd8ddZd d Zd d Zd dZddZ ddZ ddZ e ddZ e ddZddZddZddZe dd Ze d!d"Ze d#d$Zd%d&Zd'd(Zd)d*Zd+d,Ze d-d.Zd/d0Zd9d1d2Zd3d4Zd5d6ZdS):rzTemporary 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. Frw+brNc CsHd|krtj|_ntjdd|_||_d|_|||||||d|_dS)Nb )rF)r"rrHrGrrrI)rwBytesIO_fileStringIO _max_size_rolled_TemporaryFileArgs) rQmax_sizer"rrrrHrGrIr#r#r$r s zSpooledTemporaryFile.__init__cCs,|jr dS|j}|r(|j|kr(|jdS)N)rrtellrollover)rQrrr#r#r$_checks zSpooledTemporaryFile._checkcCsN|jr dS|j}tf|j}|_|`|j|j|j|jdd|_dS)NrT)rrrrrxgetvalueseekr)rQrZnewfiler#r#r$r szSpooledTemporaryFile.rollovercCs|jjrtd|S)Nz%Cannot enter context with closed file)rclosed ValueError)rQr#r#r$r1szSpooledTemporaryFile.__enter__cCs|jjdS)N)rr.)rQrrrr#r#r$r6szSpooledTemporaryFile.__exit__cCs |jjS)N)rrS)rQr#r#r$rS:szSpooledTemporaryFile.__iter__cCs|jjdS)N)rr.)rQr#r#r$r.=szSpooledTemporaryFile.closecCs|jjS)N)rr)rQr#r#r$r@szSpooledTemporaryFile.closedc Cs8y|jjStk r2d|jdkr(|jdSXdS)Nrr"r)rrrlr)rQr#r#r$rDs zSpooledTemporaryFile.encodingcCs|j|jjS)N)rrfileno)rQr#r#r$rMszSpooledTemporaryFile.filenocCs|jjdS)N)rflush)rQr#r#r$rQszSpooledTemporaryFile.flushcCs |jjS)N)risatty)rQr#r#r$rTszSpooledTemporaryFile.isattyc Cs(y|jjStk r"|jdSXdS)Nr")rr"rlr)rQr#r#r$r"WszSpooledTemporaryFile.modec Cs"y|jjStk rdSXdS)N)rr rl)rQr#r#r$r ^szSpooledTemporaryFile.namec Cs8y|jjStk r2d|jdkr(|jdSXdS)Nrr"r)rnewlinesrlr)rQr#r#r$res zSpooledTemporaryFile.newlinescGs |jj|S)N)rread)rQr3r#r#r$rnszSpooledTemporaryFile.readcGs |jj|S)N)rreadline)rQr3r#r#r$rqszSpooledTemporaryFile.readlinecGs |jj|S)N)r readlines)rQr3r#r#r$rtszSpooledTemporaryFile.readlinescGs|jj|dS)N)rr)rQr3r#r#r$rwszSpooledTemporaryFile.seekcCs|jjS)N)r softspace)rQr#r#r$rzszSpooledTemporaryFile.softspacecCs |jjS)N)rr)rQr#r#r$r~szSpooledTemporaryFile.tellcCs6|dkr|jjn||jkr&|j|jj|dS)N)rtruncaterr)rQsizer#r#r$rs   zSpooledTemporaryFile.truncatecCs|j}|j|}|j||S)N)rrxr)rQsrrvr#r#r$rxs  zSpooledTemporaryFile.writecCs|j}|j|}|j||S)N)r writelinesr)rQiterablerrr#r#r$rs  zSpooledTemporaryFile.writelines)rrrNNNNN)N)r]r^r_r`rrrrrrrSr.rarrrrrr"r rrrrrrrrrxrr#r#r#r$rs8        c@sFeZdZdZdddZeddZddZd d Zd d Z d dZ 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)rr _weakreffinalize_cleanupformat _finalizer)rQrHrGrIr#r#r$rs zTemporaryDirectory.__init__cCst|tj|tdS)N)r; _warningswarnResourceWarning)clsr rr#r#r$rszTemporaryDirectory._cleanupcCsdj|jj|jS)Nz <{} {!r}>)r __class__r]r )rQr#r#r$__repr__szTemporaryDirectory.__repr__cCs|jS)N)r )rQr#r#r$rszTemporaryDirectory.__enter__cCs |jdS)N)cleanup)rQrrrr#r#r$rszTemporaryDirectory.__exit__cCs|jjrt|jdS)N)rdetachr;r )rQr#r#r$rs zTemporaryDirectory.cleanup)NNN) r]r^r_r`r classmethodrrrrrr#r#r#r$rs   )FN)NNNF)NNNr)rrNNNNNTr)rrNNNNN)Or`__all__ functoolsrwarningsriorwosrZshutilZ_shutilZrmtreer; ImportErrorsysrr(rrr-r)rrsupports_dir_fdr supports_fdsupports_follow_symlinksr4errnorZrandomr<rPweakrefr_threadZ _dummy_thread allocate_lockZ_allocate_lockO_RDWRrO_EXCLrrr=rvr>rrErrr@rDrKrLrprrrrr r r r r rrrrrrr platformrrrobjectrr#r#r#r$s !,  3          -  ( ' +? $  8