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 \CSã @sxdZddlmZddlmZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z ddlZdddd d d d d ddddg ZeddƒZde_dd„Zdd„Zd+dd „Zd,dd „Zed-dd„ƒZd.dd„Zejejjeƒdd„ZGd d „d ƒZGd!d„dƒZy.ddlZdd"lmZd/d#d$„ZejeeƒWne k �r@YnXd%d„Z!d0d&d„Z"d'd„Z#d(d „Z$d)d„Z%d*d „Z&dS)1zUtilities to support packages.é)Ú namedtuple)ÚsingledispatchN)Ú ModuleTypeÚ get_importerÚiter_importersÚ get_loaderÚ find_loaderÚ walk_packagesÚ iter_modulesÚget_dataÚ ImpImporterÚ ImpLoaderÚ read_codeÚ extend_pathÚ ModuleInfozmodule_finder name ispkgz.A namedtuple with minimal info about a module.c CsLy |j}Wn4tk r>|j|ƒ}|dkr0dStjj||ƒSX||ƒSdS)z'Return the finder-specific module spec.N)Ú find_specÚAttributeErrorÚ find_moduleÚ importlibÚutilÚspec_from_loader)ÚfinderÚnamerÚloader©rú/usr/lib64/python3.6/pkgutil.pyÚ _get_specs  rcCs6ddl}|jdƒ}|tjjkr"dS|jdƒ|j|ƒS)Nréé)ÚmarshalÚreadrrÚ MAGIC_NUMBERÚload)ÚstreamrÚmagicrrrr(s    Úc #sÐifdd„‰x¾t||ƒD]°}|V|jryt|jƒWnNtk r\|dk rX||jƒYqtk r„|dk r~||jƒn‚YqXttj|jddƒpœg}‡fdd„|Dƒ}t ||jd|ƒEdHqWdS)a«Yields ModuleInfo 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||kr dSd||<dS)NTr)ÚpÚmrrrÚseenRszwalk_packages..seenNÚ__path__csg|]}ˆ|ƒs|‘qSrr)Ú.0r&)r(rrú isz!walk_packages..Ú.) r ÚispkgÚ __import__rÚ ImportErrorÚ ExceptionÚgetattrÚsysÚmodulesr )ÚpathÚprefixÚonerrorÚinfor)r(rr 5s   ccsf|dkrtƒ}n tt|ƒ}i}xB|D]:}x4t||ƒD]&\}}||kr4d||<t|||ƒVq4Wq$WdS)aYields ModuleInfo 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_modulesr)r4r5Z importersÚyieldedÚirr-rrrr ns   cCst|dƒsgS|j|ƒS)Nr )Úhasattrr )Úimporterr5rrrr:…s r:c cs0|jdkstjj|jƒ rdSi}ddl}ytj|jƒ}Wntk rRg}YnX|jƒxÎ|D]Æ}|j|ƒ}|dksb||kr‚qbtjj|j|ƒ}d}| o®tjj|ƒo®d|k�r|}ytj|ƒ} Wntk rÜg} YnXx&| D]}|j|ƒ} | dkräd}PqäWqb|rbd|krbd||<|||fVqbWdS)NrÚ__init__Fr,Tr8) r4ÚosÚisdirÚinspectÚlistdirÚOSErrorÚsortÚ getmodulenameÚjoin) r>r5r;rBÚ filenamesÚfnÚmodnamer4r-Ú dircontentsÚsubnamerrrÚ_iter_file_finder_modules�s<       rMc Cs.tjƒ�tjdtƒtjdƒaWdQRXdS)NÚignoreÚimp)ÚwarningsÚcatch_warningsÚ simplefilterÚDeprecationWarningrÚ import_modulerOrrrrÚ _import_imp¹s  rUc@s.eZdZdZd dd„Zd dd„Zd dd „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. NcCstjdtƒtƒ||_dS)Nz5This emulation is deprecated, use 'importlib' instead)rPÚwarnrSrUr4)Úselfr4rrrr?ÊszImpImporter.__init__c Cs~|jdƒd}||kr$|jdkr$dS|jdkr4d}ntjj|jƒg}ytj||ƒ\}}}Wntk rndSXt||||ƒS)Nr,r8éÿÿÿÿ)Úsplitr4r@ÚrealpathrOrr/r )rWÚfullnamer4rLÚfileÚfilenameÚetcrrrrÑs zImpImporter.find_moduler%c cs0|jdkstjj|jƒ rdSi}ddl}ytj|jƒ}Wntk rRg}YnX|jƒxÎ|D]Æ}|j|ƒ}|dksb||kr‚qbtjj|j|ƒ}d}| o®tjj|ƒo®d|k�r|}ytj|ƒ} Wntk rÜg} YnXx&| D]}|j|ƒ} | dkräd}PqäWqb|rbd|krbd||<|||fVqbWdS)Nrr?Fr,Tr8) r4r@rArBrCrDrErFrG) rWr5r;rBrHrIrJr4r-rKrLrrrr às<       zImpImporter.iter_modules)N)N)r%)Ú__name__Ú __module__Ú __qualname__Ú__doc__r?rr rrrrr ¿s   c@sneZdZdZdZZdd„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)rPrVrSrUr\r]r[r^)rWr[r\r]r^rrrr?szImpLoader.__init__c Cs:|jƒztj||j|j|jƒ}Wd|jr4|jjƒX|S)N)Ú_reopenrOÚ load_moduler\r]r^Úclose)rWr[Úmodrrrrds  zImpLoader.load_modulec Cst|dƒ� }|jƒSQRXdS)NÚrb)Úopenr )rWÚpathnamer\rrrr "s zImpLoader.get_datacCsT|jrP|jjrP|jd}|tjkr2t|jdƒ|_n|tjtjfkrPt|jdƒ|_dS)NéÚrrg) r\Úclosedr^rOÚ PY_SOURCErhr]Ú PY_COMPILEDÚ C_EXTENSION)rWÚmod_typerrrrc&s   zImpLoader._reopencCs0|dkr|j}n||jkr,td|j|fƒ‚|S)Nz,Loader for module %s cannot handle module %s)r[r/)rWr[rrrÚ _fix_name.s  zImpLoader._fix_namecCs|j|ƒ}|jdtjkS)Nrj)rqr^rOÚ PKG_DIRECTORY)rWr[rrrÚ is_package6s zImpLoader.is_packagec Cs”|j|ƒ}|jdkrŽ|jd}|tjkrD|j|ƒ}t||jdƒ|_nJ|tjkrv|j ƒzt |j ƒ|_Wd|j j ƒXn|tj krŽ|jƒjƒ|_|jS)NrjÚexec)rqÚcoder^rOrmÚ get_sourceÚcompiler]rnrcrr\rerrÚ _get_delegateÚget_code)rWr[rpÚsourcerrrry:s       zImpLoader.get_codec Csº|j|ƒ}|jdkr´|jd}|tjkrP|jƒz|jjƒ|_Wd|jjƒXnd|tj krœt j j |j dd…ƒr´t|j dd…dƒ�}|jƒ|_WdQRXn|tjkr´|jƒjƒ|_|jS)Nrjr8rkrXrX)rqrzr^rOrmrcr\r rernr@r4Úexistsr]rhrrrxrv)rWr[rpÚfrrrrvKs      zImpLoader.get_sourcecCst|jƒ}t|dƒ}|jS)Nr?)r r]rr)rWrÚspecrrrrx]s  zImpLoader._get_delegatecCsH|j|ƒ}|jd}|tjkr*|jƒjƒS|tjtjtjfkrD|j SdS)Nrj) rqr^rOrrrxÚ get_filenamermrnror])rWr[rprrrr~bs    zImpLoader.get_filename)N)N)N)r_r`rarbrurzr?rdr rcrqrsryrvrxr~rrrrr s    )Ú zipimporterc csðttj|jƒ}|j}t|ƒ}i}ddl}xÀ|D]¸}|j|ƒs@q0||d…jt j ƒ}t|ƒdkr˜|djdƒr˜|d|kr˜d||d<||ddfVt|ƒdkr¦q0|j |dƒ}|dkr¾q0|r0d|kr0||kr0d||<||dfVq0WdS) Nrrjr8z __init__.pyTr?r,F) ÚsortedÚ zipimportÚ_zip_directory_cacheÚarchiver5ÚlenrBÚ startswithrYr@ÚseprF) r>r5ZdirlistÚ_prefixZplenr;rBrIrJrrrÚiter_zipimport_modulesps*     rˆcCsnytj|}WnZtk rhxDtjD]6}y||ƒ}tjj||ƒPWq&tk rZYq&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)r2Úpath_importer_cacheÚKeyErrorÚ path_hooksÚ setdefaultr/)Z path_itemr>Ú path_hookrrrr’s    ccs„|jdƒrdj|ƒ}t|ƒ‚d|krV|jdƒd}tj|ƒ}t|ddƒ}|dkrhdSntjEdHtj }x|D]}t |ƒVqnWdS)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/Ú rpartitionrrTr1r2Ú meta_pathr4r)r[ÚmsgZpkg_nameZpkgr4Úitemrrrrªs      cCsn|tjkr tj|}|dkr dSt|tƒrb|}t|ddƒ}|dk rF|St|ddƒdkrZdS|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__)r2r3Ú isinstancerr1r_r)Zmodule_or_nameÚmodulerr[rrrrÇs    cCs†|jdƒrdj|ƒ}t|ƒ‚ytjj|ƒ}WnFttttfk rr}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)r[r‘r}Zexrrrrßs  *cCsªt|tƒs|S|d}|dd…}|jdƒ\}}}|rbytj|j}Wqhttfk r^|SXntj}�x:|D�]0}t|t ƒs‚qpt |ƒ}|dk rög} t |dƒr¾|j |ƒ} | dk rÖ| j pºg} nt |dƒrÖ|j|ƒ\}} x| D]} | |krÜ|j| ƒqÜWtjj||ƒ} tjj| ƒrpy t| ƒ} Wn8tk �rT}ztjjd| |fƒWYdd}~XqpX| �Bx:| D]2}|jdƒ}| �sb|jdƒ�rˆ�qb|j|ƒ�qbWWdQRXqpW|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�r2r3r)rŠrr4Ústrrr=rÚsubmodule_search_locationsrÚappendr@rGÚisfilerhrDÚstderrÚwriteÚrstripr…)r4rZ sname_pkgZparent_packageÚ_Z final_nameZ search_pathÚdirrÚportionsr}ZportionZpkgfiler|r‘ÚlinerrrrôsP!            cCsœtjj|ƒ}|dkrdS|j}|dks2t|dƒ r6dStjj|ƒpLtjj |ƒ}|dksbt|dƒ rfdS|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=r2r3ÚgetÚ _bootstrapÚ_loadrYÚinsertr@r4Údirnamer¨rGr )ÚpackageZresourcer}rrfÚpartsZ resource_namerrrr Rs     )Nr%N)Nr%)r%)r%)r%)r%)'rbÚ collectionsrÚ functoolsrZ simplegenericrÚimportlib.utilZimportlib.machineryr@Zos.pathr2ÚtypesrrPÚ__all__rrrr r r:rMÚregisterÚ machineryÚ FileFinderrUr r r�rrˆr/rrrrrr rrrrÚsR     9   ( Jc   ^