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
 lŽŒYkSã @sïdZddlmZddlZddlZddlZddlZddlZddl Z ddl m Z ddl Z ddddd d d d d ddg Z dd„Zdd„Zddddd „Zdddd „Zeddd„ƒZddd„Zejejjeƒdd„ZGdd „d ƒZGdd „d ƒZy?ddlZddlmZddd „ZejeeƒWnek rŸYnXd!d„Zdd"d„Zd#d„Z d$d„Z!d%d„Z"d&d „Z#dS)'zUtilities to support packages.é)ÚsingledispatchN)Ú ModuleTypeÚ get_importerÚiter_importersÚ get_loaderÚ find_loaderÚ walk_packagesÚ iter_modulesÚget_dataÚ ImpImporterÚ ImpLoaderÚ read_codeÚ extend_pathc Csby |j}WnDtk rS|j|ƒ}|dkr<dStjj||ƒSYn X||ƒSdS)z'Return the finder-specific module spec.N)Ú find_specÚAttributeErrorÚ find_moduleÚ importlibÚutilÚspec_from_loader)ÚfinderÚnamerÚloader©rú&/opt/python35/lib/python3.5/pkgutil.pyÚ _get_specs   rcCs]ddl}|jdƒ}|tjjkrC|tjjkrCdS|jdƒ|j|ƒS)Nréé)ÚmarshalÚreadrrÚ MAGIC_NUMBERÚ_BACKCOMPAT_MAGIC_NUMBERÚload)ÚstreamrÚmagicrrrr "s  Úc #sidd„‰xët||ƒD]Ú\}}}|||fV|ryt|ƒWnUtk rz|dk rv||ƒYqtk r§|dk r ||ƒn‚YqXttj|ddƒpÄg}‡fdd†|Dƒ}t||d|ƒEdHqWdS)a½Yields (module_finder, name, ispkg) for all modules recursively on path, or, if path is None, all accessible modules. 'path' should be either None or a list of paths to look for modules in. 'prefix' is a string to output on the front of every module name on output. Note that this function must import all *packages* (NOT all modules!) on the given path, in order to access the __path__ attribute to find submodules. 'onerror' is a function which gets called with one argument (the name of the package which was being imported) if any exception occurs while trying to import a package. If no onerror function is supplied, ImportErrors are caught and ignored, while all other exceptions are propagated, terminating the search. Examples: # list all modules python can access walk_packages() # list all submodules of ctypes walk_packages(ctypes.__path__, ctypes.__name__+'.') cSs||krdSd||.seenNÚ__path__cs"g|]}ˆ|ƒs|‘qSrr)Ú.0r%)r'rrú fs z!walk_packages..Ú.)r Ú __import__Ú ImportErrorÚ ExceptionÚgetattrÚsysÚmodulesr)ÚpathÚprefixÚonerrorÚimporterrÚispkgr)r'rr2s      ccs†|dkrtƒ}ntt|ƒ}i}xR|D]J}xAt||ƒD]0\}}||krJd||<|||fVqJWq4WdS)a&Yields (module_finder, name, ispkg) for all submodules on path, or, if path is None, all top-level modules on sys.path. 'path' should be either None or a list of paths to look for modules in. 'prefix' is a string to output on the front of every module name on output. Né)rÚmaprÚiter_importer_modules)r2r3Z importersÚyieldedÚirr6rrrr ks     cCs t|dƒsgS|j|ƒS)Nr )Úhasattrr )r5r3rrrr9ƒsr9c cs�|jdks%tjj|jƒ r)dSi}ddl}ytj|jƒ}Wntk rkg}YnX|jƒx|D]}|j|ƒ}|dks}||kr­q}tjj|j|ƒ}d}| rZtjj|ƒrZd|krZ|}ytj|ƒ} Wntk r#g} YnXx3| D](}|j|ƒ} | dkr+d}Pq+Wq}|r}d|kr}d||<|||fVq}WdS)NrÚ__init__Fr+Tr7) r2ÚosÚisdirÚinspectÚlistdirÚOSErrorÚsortÚ getmodulenameÚjoin) r5r3r:r@Ú filenamesÚfnÚmodnamer2r6Ú dircontentsÚsubnamerrrÚ_iter_file_finder_modules‹s<%     %     rKc Cs7tjƒ�$tjdtƒtjdƒaWdQRXdS)NÚignoreÚimp)ÚwarningsÚcatch_warningsÚ simplefilterÚPendingDeprecationWarningrÚ import_modulerMrrrrÚ _import_imp·s rSc@sCeZdZdZddd„Zddd„Zddd „ZdS) r aPEP 302 Finder that wraps Python's "classic" import algorithm ImpImporter(dirname) produces a PEP 302 finder that searches that directory. ImpImporter(None) produces a PEP 302 finder that searches the current sys.path, plus any modules that are frozen or built-in. Note that ImpImporter does not currently support being used by placement on sys.meta_path. NcCs$tjdtƒtƒ||_dS)Nz5This emulation is deprecated, use 'importlib' instead)rNÚwarnÚDeprecationWarningrSr2)Úselfr2rrrr=Ès zImpImporter.__init__c Cs­|jdƒd}||kr2|jdkr2dS|jdkrJd}ntjj|jƒg}ytj||ƒ\}}}Wntk r™dSYnXt||||ƒS)Nr+r7éÿÿÿÿ)Úsplitr2r>ÚrealpathrMrr-r )rVÚfullnamer2rJÚfileÚfilenameÚetcrrrrÏs   zImpImporter.find_moduler$c cs�|jdks%tjj|jƒ r)dSi}ddl}ytj|jƒ}Wntk rkg}YnX|jƒx|D]}|j|ƒ}|dks}||kr­q}tjj|j|ƒ}d}| rZtjj|ƒrZd|krZ|}ytj|ƒ} Wntk r#g} YnXx3| D](}|j|ƒ} | dkr+d}Pq+Wq}|r}d|kr}d||<|||fVq}WdS)Nrr=Fr+Tr7) r2r>r?r@rArBrCrDrE) rVr3r:r@rFrGrHr2r6rIrJrrrr Þs<%     %     zImpImporter.iter_modules)Ú__name__Ú __module__Ú __qualname__Ú__doc__r=rr rrrrr ½s c@s¡eZdZdZdZZdd„Zdd„Zdd„Zd d „Z d d „Z d d„Z ddd„Z ddd„Z dd„Zddd„ZdS)r zBPEP 302 Loader that wraps Python's "classic" import algorithm NcCs?tjdtƒtƒ||_||_||_||_dS)Nz5This emulation is deprecated, use 'importlib' instead)rNrTrUrSr[r\rZr])rVrZr[r\r]rrrr= s    zImpLoader.__init__c CsM|jƒz%tj||j|j|jƒ}Wd|jrH|jjƒX|S)N)Ú_reopenrMÚ load_moduler[r\r]Úclose)rVrZÚmodrrrrcs  % zImpLoader.load_modulec Cs't|dƒ�}|jƒSWdQRXdS)NÚrb)Úopenr)rVÚpathnamer[rrrr szImpLoader.get_datacCsz|jrv|jjrv|jd}|tjkrIt|jdƒ|_n-|tjtjfkrvt|jdƒ|_dS)NéÚrrf) r[Úclosedr]rMÚ PY_SOURCErgr\Ú PY_COMPILEDÚ C_EXTENSION)rVÚmod_typerrrrb$s  zImpLoader._reopencCsD|dkr|j}n(||jkr@td|j|fƒ‚|S)Nz,Loader for module %s cannot handle module %s)rZr-)rVrZrrrÚ _fix_name,s   zImpLoader._fix_namecCs#|j|ƒ}|jdtjkS)Nri)rpr]rMÚ PKG_DIRECTORY)rVrZrrrÚ is_package4szImpLoader.is_packagec CsÒ|j|ƒ}|jdkrË|jd}|tjkrd|j|ƒ}t||jdƒ|_ng|tjkr§|j ƒzt |j ƒ|_Wd|j j ƒXn$|tj krË|jƒjƒ|_|jS)NriÚexec)rpÚcoder]rMrlÚ get_sourceÚcompiler\rmrbr r[rdrqÚ _get_delegateÚget_code)rVrZroÚsourcerrrrx8s  zImpLoader.get_codec Csÿ|j|ƒ}|jdkrø|jd}|tjkrn|jƒz|jjƒ|_Wd|jjƒXnŠ|tj krÔt j j |j dd…ƒrøt|j dd…dƒ�}|jƒ|_WdQRXn$|tjkrø|jƒjƒ|_|jS)Nrir7rjrWrW)rpryr]rMrlrbr[rrdrmr>r2Úexistsr\rgrqrwru)rVrZroÚfrrrruIs  zImpLoader.get_sourcecCs%t|jƒ}t|dƒ}|jS)Nr=)r r\rr)rVrÚspecrrrrw[szImpLoader._get_delegatecCsd|j|ƒ}|jd}|tjkr;|jƒjƒS|tjtjtjfkr`|j SdS)Nri) rpr]rMrqrwÚ get_filenamerlrmrnr\)rVrZrorrrr}`s zImpLoader.get_filename)r^r_r`rartryr=rcr rbrprrrxrurwr}rrrrr s       )Ú zipimporterc csDttj|jƒ}|j}t|ƒ}i}ddl}x|D]ø}|j|ƒs\qD||d…jt j ƒ}t|ƒdkrÎ|djdƒrÎ|d|krÎd||d<||ddfVt|ƒdkrãqD|j |dƒ}|dkrqD|rDd|krD||krDd||<||dfVqDWdS) Nrrir7z __init__.pyTr=r+F) ÚsortedÚ zipimportÚ_zip_directory_cacheÚarchiver3Úlenr@Ú startswithrXr>ÚseprD) r5r3ÚdirlistZ_prefixZplenr:r@rGrHrrrÚiter_zipimport_modulesns*    %  r‡cCs}ytj|}Wnetk rxxPtjD]?}y$||ƒ}tjj||ƒPWq+tk riYq+Xq+Wd}YnX|S)zÿRetrieve a finder for the given path item The returned finder is cached in sys.path_importer_cache if it was newly created by a path hook. The cache (or part of it) can be cleared manually if a rescan of sys.path_hooks is necessary. N)r0Úpath_importer_cacheÚKeyErrorÚ path_hooksÚ setdefaultr-)Z path_itemr5Ú path_hookrrrr�s      ccs²|jdƒr*dj|ƒ}t|ƒ‚d|kr}|jdƒd}tj|ƒ}t|ddƒ}|dkr’dSntjEdHtj }x|D]}t |ƒVq™WdS)a¹Yield finders for the given module name If fullname contains a '.', the finders will be for the package containing fullname, otherwise they will be all registered top level finders (i.e. those on both sys.meta_path and sys.path_hooks). If the named module is in a package, that package is imported as a side effect of invoking this function. If no module name is specified, all top level finders are produced. r+z'Relative module name {!r} not supportedrr(N) r„Úformatr-Ú rpartitionrrRr/r0Ú meta_pathr2r)rZÚmsgZpkg_nameZpkgr2Úitemrrrr¨s       cCs›|tjkr,tj|}|dkr,dSt|tƒr‹|}t|ddƒ}|dk rc|St|ddƒdkrdS|j}n|}t|ƒS)zøGet a "loader" object for module_or_name Returns None if the module cannot be found or imported. If the named module is not already imported, its containing package (if any) is imported, in order to establish the package __path__. NÚ __loader__Ú__spec__)r0r1Ú isinstancerr/r^r)Zmodule_or_nameÚmodulerrZrrrrÅs    cCsµ|jdƒr*dj|ƒ}t|ƒ‚ytjj|ƒ}Wn[ttttfk r�}z/d}t|j|t |ƒ|ƒƒ|‚WYdd}~XnX|dk r±|j SdS)zàFind a "loader" object for fullname This is a backwards compatibility wrapper around importlib.util.find_spec that converts most failures to ImportError and only returns the loader rather than the full spec r+z'Relative module name {!r} not supportedz,Error while finding loader for {!r} ({}: {})N) r„r�r-rrrrÚ TypeErrorÚ ValueErrorÚtyper)rZr�r|ÚexrrrrÝs 7cCs&t|tƒs|S|d}|dd…}|jdƒ\}}}|r�ytj|j}WqŠttfk r}|SYqŠXn tj}x•|D]�}t|t ƒs©q‘t |ƒ}|dk rQg} t |dƒr|j |ƒ} | dk r'| j pýg} n$t |dƒr'|j|ƒ\}} x'| D]} | |kr.|j| ƒq.Wtjj||ƒ} tjj| ƒr‘yt| ƒ} Wn?tk rÉ}ztjjd| |fƒWYdd}~Xq‘X| �KxC| D];}|jdƒ}| sØ|jdƒrqØ|j|ƒqØWWdQRXq‘W|S) a‹Extend a package's path. Intended use is to place the following code in a package's __init__.py: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) This will add to the package's __path__ all subdirectories of directories on sys.path named after the package. This is useful if one wants to distribute different parts of a single logical package as multiple directories. It also looks for *.pkg files beginning where * matches the name argument. This feature is similar to *.pth files (see site.py), except that it doesn't special-case lines starting with 'import'. A *.pkg file is trusted at face value: apart from checking for duplicates, all entries found in a *.pkg file are added to the path, regardless of whether they are exist the filesystem. (This is a feature.) If the input path is not a list (as is the case for frozen packages) it is returned unchanged. The input path is not modified; an extended copy is returned. Items are only appended to the copy at the end. It is assumed that sys.path is a sequence. Items of sys.path that are not (unicode or 8-bit) strings referring to existing directories are ignored. Unicode items of sys.path that cause errors when used as filenames may cause this function to raise an exception (in line with os.path.isdir() behavior). z.pkgNr+rrzCan't open %s: %s Ú ú#)r”ÚlistrŽr0r1r(r‰rr2Ústrrr<rÚsubmodule_search_locationsrÚappendr>rEÚisfilergrBÚstderrÚwriteÚrstripr„)r2rZ sname_pkgZparent_packageÚ_Z final_nameZ search_pathÚdirrÚportionsr|ZportionZpkgfiler{r�ÚlinerrrròsP!          ! cCsÜtjj|ƒ}|dkr"dS|j}|dksGt|dƒ rKdStjj|ƒpltjj |ƒ}|dks‹t|dƒ r�dS|j dƒ}|j dt j j|jƒƒt j j|Œ}|j|ƒS)afGet a resource from a package. This is a wrapper round the PEP 302 loader get_data API. The package argument should be the name of a package, in standard module format (foo.bar). The resource argument should be in the form of a relative filename, using '/' as the path separator. The parent directory name '..' is not allowed, and nor is a rooted name (starting with a '/'). The function returns a binary string, which is the contents of the specified resource. For packages located in the filesystem, which have already been imported, this is the rough equivalent of d = os.path.dirname(sys.modules[package].__file__) data = open(os.path.join(d, resource), 'rb').read() If the package cannot be located or loaded, or it uses a PEP 302 loader which does not support get_data(), then None is returned. Nr Ú__file__ú/r)rrrrr<r0r1ÚgetÚ _bootstrapÚ_loadrXÚinsertr>r2Údirnamer¨rEr )ÚpackageZresourcer|rreÚpartsZ resource_namerrrr Ps  )$raÚ functoolsrZ simplegenericrÚimportlib.utilZimportlib.machineryr>Zos.pathr0ÚtypesrrNÚ__all__rr rr r9rKÚregisterÚ machineryÚ FileFinderrSr r r€r~r‡r-rrrrrr rrrrÚsJ           9( Jc      ^