Tc@sdGHdGHdGHdGHdGHdGHdGHdGHdGHdGHdGHddkZddkZddkZddkZdd kTd Zd efd YZe d joeei Z e i ndS(sContent-type: text/html s sCGI Tests s

Test page using Python

s4

Test pxxxxxxxxxxxxxxxxxxxxxxxage using Python

siN(t*s)Usage: %s [optional paths] % sys.argv[0])tPkgUtilcBsPeZdZddZdZdZdZdZdZ dZ RS( sQ Utility class for querying information about installed packages and modules cCs+ti|_|o||i|_ndS(N(tsystpathtpaths(tselfR((s(/home/mike1234/public_html/stuff/test.pyt__init__s cCs1yt|}|SWntj o }dSXdS(s.Search in standard paths for a package/module N((t find_modulet ImportError(Rtpkgnametresultte((s(/home/mike1234/public_html/stuff/test.pytfind_standard_package$s  cCswtii|}tii|d}tii|ptii||d}ntii|o|S|SdS(sf Return the init file path for the package. This has to be called only for directory packages s __init__.pys.pyN(tosRtabspathtjointisfile(RR tpkgdirt pkginitfile((s(/home/mike1234/public_html/stuff/test.pytget_package_init_path-sc Cs2tii|pdSd}yt|d}|i}|oyti||d}|oo|i}d}|idxP|D]D}di ||f}|d7}||jp |djoPqqWnWqt j o } qt j o } qXn|i Wnt ttfj o } nX|S(sI Open the package and load comments if any. Return the loaded comments ttrbtexeciis (R Rtexiststopentreadtcompilertcompiletco_firstlinenotseekRt SyntaxErrort ExceptiontclosetOSErrortIOErrort TypeError( RtpkgfiletcommenttoftdatatctlnotlnumtlineR ((s(/home/mike1234/public_html/stuff/test.pyt load_comments?s6     c Csh}|id}|d}y|i|}| o |iot||i}n|oY|\}}}t|djo3yt||||} Wntj o } |SX||d<|d|dst__path__(tsplitR RRtlent load_moduleRR RtdirnameRt__doc__t PY_SOURCEt PKG_DIRECTORYRR,Rtreducethasattrt find_packageR4( RR tdtpackagest top_levelR R&tpathnametdesctMR R$((s(/home/mike1234/public_html/stuff/test.pyR>fsf        cCs|tjodS|tjodS|tjodS|tjodS|tjodS|tjodS|tjodSdSd S( s. Return information on the package - Version 2sPYTHON SOURCE FILE MODULESs$PYTHON COMPILED CODE OBJECT MODULES s9DYNAMICALLY LOADABLE SHARED LIBRARY (C-EXTENSION) MODULESsMACINTOSH RESOURCE MODULESs PYTHON PACKAGE DIRECTORY MODULESsBUILT-IN MODULESsFROZEN PYTHON MODULESsUNKNOWN MODULESN(R:t PY_COMPILEDt C_EXTENSIONt PY_RESOURCER;t C_BUILTINt PY_FROZEN(Rtpkg_typ((s(/home/mike1234/public_html/stuff/test.pyt pkgTypeInfos       c Cstii}h}x|D]|}|i|}|pqny$||d}|d||dRtsiteR RRtprefixRtisdirRtappendtlistdirtfindtitemsRKtsort(Rt sys_modulesR@R.R?tpkginfoR RPtlibdirtwalkedRAtitemtfullpathtidxtkeyt listofitemstkey2((s(/home/mike1234/public_html/stuff/test.pyt list_packagessb&  %    *   N( t__name__t __module__R9tNoneRR RR,R>RKRb(((s(/home/mike1234/public_html/stuff/test.pyRs   ' ^ t__main__( Rtos.pathR RRPtimpt __usage__tobjectRRctargvtuRb(((s(/home/mike1234/public_html/stuff/test.pyts&