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
mŽŒYõ ã @ s 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 d g Z d Z e j j
d ƒ r„ d Z n e j ƒ Z Gd d „ d e
ƒ Z e j d d
„ ƒ Z d d „ Z d d
d „ Z d d d d d „ Z d d „ Z d d d „ Z e d k re ƒ d S)é NÚZipAppErrorÚcreate_archiveÚget_interpreterz8# -*- coding: utf-8 -*-
import {module}
{module}.{fn}()
Úwinzutf-8c @ s e Z d Z d S)r N)Ú__name__Ú
__module__Ú__qualname__© r r ú%/opt/python35/lib/python3.5/zipapp.pyr ! s c c sW t | t j ƒ r t | ƒ } t | t ƒ rN t | | ƒ � } | VWd QRXn | Vd S)N)Ú
isinstanceÚpathlibÚPathÚstrÚopen)ÚarchiveÚmodeÚfr r r
Ú_maybe_open% s r c C s. | r* d | j t ƒ d } | j | ƒ d S)zWrite a shebang line.s #!s
N)ÚencodeÚshebang_encodingÚwrite)r ÚinterpreterZshebangr r r
Ú_write_file_prefix0 s r c C sà t | d ƒ �u } | j d ƒ } | d k r= d } | j ƒ t | d ƒ �1 } t | | ƒ | j | ƒ t j | | ƒ Wd QRXWd QRX| r¿ t | t ƒ r¿ t j
| t j | ƒ j t j
Bƒ d S)z8Copy an application archive, modifying the shebang line.Úrbé s #!ó ÚwbN)r ÚreadÚreadliner r ÚshutilÚcopyfileobjr r ÚosÚchmodÚstatÚst_modeÚS_IEXEC)r Znew_archiver ÚsrcZfirst_2Údstr r r
Ú
_copy_archive7 s
r( c C s� d } t | d ƒ r- t | d ƒ r- d } n! t j | ƒ } | j ƒ rN d } | rh t | | | ƒ d S| j ƒ s€ t d ƒ ‚ | d j ƒ } | r¨ | r¨ t d ƒ ‚ | p± | sÀ t d ƒ ‚ d } | rh| j d
ƒ \ } } } t d d „ | j d
ƒ Dƒ ƒ }
t d d „ | j d
ƒ Dƒ ƒ } | d
k o=|
o=| sPt d | ƒ ‚ t
j d | d | ƒ } | d k r†| j d ƒ } n t | d ƒ s¤t j | ƒ } t
| d ƒ �£ } t | | ƒ t j | d ƒ �z }
t j | ƒ } xB | j d ƒ D]1 } t | j | ƒ ƒ } |
j t | ƒ | ƒ q÷W| rK|
j d | j d ƒ ƒ Wd QRXWd QRX| rŒt | d ƒ rŒ| j | j ƒ j t j Bƒ d S)ab Create an application archive from SOURCE.
The SOURCE can be the name of a directory, or a filename or a file-like
object referring to an existing archive.
The content of SOURCE is packed into an application archive in TARGET,
which can be a filename or a file-like object. If SOURCE is a directory,
TARGET can be omitted and will default to the name of SOURCE with .pyz
appended.
The created application archive will have a shebang line specifying
that it should run with INTERPRETER (there will be no shebang line if
INTERPRETER is None), and a __main__.py which runs MAIN (if MAIN is
not specified, an existing __main__.py will be used). It is an error
to specify MAIN for anything other than a directory source with no
__main__.py, and it is an error to omit MAIN if the directory has no
__main__.py.
Fr r TNzSource does not existz__main__.pyz8Cannot specify entry point if the source has __main__.pyzArchive has no entry pointú:c s s | ] } | j ƒ Vq d S)N)Úisidentifier)Ú.0Úpartr r r
ú | s z!create_archive..Ú.c s s | ] } | j ƒ Vq d S)N)r* )r+ r, r r r
r- } s zInvalid entry point: ÚmoduleÚfnz.pyzr r ÚwÚ*zutf-8)Úhasattrr r
Úis_filer( Úexistsr Ú partitionÚallÚsplitÚ
MAIN_TEMPLATEÚformatZwith_suffixr r ÚzipfileÚZipFileZrglobr Zrelative_tor Zwritestrr r" r# r$ r% )ÚsourceÚtargetr ÚmainZsource_is_fileZhas_mainZmain_pyÚmodÚsepr0 Zmod_okZfn_okÚfdÚzÚrootZchildZarcnamer r r
r N sP ""
'c C sK t | d ƒ �5 } | j d ƒ d k r@ | j ƒ j ƒ j t ƒ SWd QRXd S)Nr r s #!)r r r ÚstripÚdecoder )r r r r r
r • s c C sª d d l } | j ƒ } | j d d d d d d ƒ| j d d d d d d
ƒ| j d d d d d d
ƒ| j d d d d d d d ƒ| j d d d ƒ| j | ƒ } | j rt j j | j ƒ s× t d ƒ ‚ t
| j ƒ } t d j | pø d ƒ ƒ t
j d ƒ t j j | j ƒ r�| j d k s`t j j | j ƒ rlt j j | j | j ƒ rlt d ƒ ‚ | j r�t d ƒ ‚ t | j | j d | j d | j ƒd S)zÞRun the zipapp command line interface.
The ARGS parameter lets you specify the argument list directly.
Omitting ARGS (or setting it to None) works as for argparse, using
sys.argv[1:] as the argument list.
r Nz--outputz-oÚdefaultÚhelpzAThe name of the output archive. Required if SOURCE is an archive.z--pythonz-pzEThe name of the Python interpreter to use (default: no shebang line).z--mainz-mzLThe main function of the application (default: use an existing __main__.py).z--infoFÚactionÚ
store_truez)Display the interpreter from the archive.r= z'Source directory (or existing archive).z%Can only get info for an archive filezInterpreter: {}zz-In-place editing of archives is not supportedz,Cannot change the main function when copyingr r? )ÚargparseÚArgumentParserÚadd_argumentÚ
parse_argsÚinfor! ÚpathÚisfiler= Ú
SystemExitr Úprintr: ÚsysÚexitÚoutputr5 Úsamefiler? r Úpython)ÚargsrK Úparserr r r r
r? › s6
$ r? Ú__main__)Ú
contextlibr! r r r# rT r; Ú__all__r9 ÚplatformÚ
startswithr ÚgetfilesystemencodingÚ
ValueErrorr Úcontextmanagerr r r( r r r? r r r r r
Ú s( G-