Ñò ñ” ]c@s#dZddkZddkZddkZddkZddkZddkZddddddgZdefd „ƒYZ hZ gZ dd d „Z dd „Zd d d„Zd„Zd„Zd d„Zeid djo d„Zn d„Zd„Zdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZeZd!efd"„ƒYZd#efd$„ƒYZd%efd&„ƒYZd'efd(„ƒYZ d)efd*„ƒYZ!d+„Z"ei#id,ƒo e"ƒnei#id-ƒo ed.ƒoe d.ded.ƒƒned/ƒoe d/ded/ƒƒned0ƒoe d0ded0ƒƒned1ƒoe d1ded1ƒƒq¿neid djo¤d2efd3„ƒYZ$gZ hZ e d4e$ƒei%i&ei#id5d6ƒd7ƒZ'xNd8d9d:d;d<d=e'fD]-Z(ee(ƒoe e(dee(ƒƒqBqBWnyddk)Z)Wne*j on+Xd>efd?„ƒYZ+e d@e+dAdƒeidBjo3dCefdD„ƒYZ,e dCde,dEƒdƒneid dFjo?ed<ƒo2gZ hZ e dGdedHd<dIgƒdƒndJei#jo’ei#dJi-ei.ƒZ/e/i0ƒx\e/D]TZ1e1dKjoAee1dƒZ2e2d djoe e1dee1ƒdƒqêq–q–WdZ1[1[/ndL„Z3e4dMjo e3ƒndS(Ns?Interfaces for launching and remotely controlling Web browsers.iÿÿÿÿNtErrortopentopen_newt open_new_tabtgettregistercBseZRS((t__name__t __module__(((s"/usr/lib64/python2.6/webbrowser.pyR sicCsY||gt|iƒ<|djoti|ƒn"|djotid|ƒndS(s9Register a browser connector and, optionally, connection.iN(t _browserstlowert _tryordertappendtinsert(tnametklasstinstancetupdate_tryorder((s"/usr/lib64/python2.6/webbrowser.pyRs   cCsø|dj o |g}nt}xÅ|D]½}d|jo=ti|ƒ}|ddjot|d ƒSt|ƒSq'yt|iƒ}Wntj ot |ƒ}nX|ddj o |dS|ddj o |dƒSq'Wt dƒ‚dS(sCReturn a browser launcher instance appropriate for the environment.s%siÿÿÿÿt&iis!could not locate runnable browserN( tNoneR tshlextsplittBackgroundBrowsertGenericBrowserRR tKeyErrort _synthesizeR(tusingt alternativestbrowsertcommand((s"/usr/lib64/python2.6/webbrowser.pyRs&    icCs<x5tD]-}t|ƒ}|i|||ƒotSqWtS(N(R RRtTruetFalse(turltnewt autoraiseR R((s"/usr/lib64/python2.6/webbrowser.pyR9s   cCs t|dƒS(Ni(R(R((s"/usr/lib64/python2.6/webbrowser.pyR@scCs t|dƒS(Ni(R(R((s"/usr/lib64/python2.6/webbrowser.pyRCsc Csó|iƒd}t|ƒp ddgStii|ƒ}yt|iƒ}Wntj oddgSX|d}|om|iƒ|ijoWddk }|i |ƒ}||_ tii|ƒ|_t |d||ƒd|gSddgS(s¾Attempt to synthesize a controller base on existing controllers. This is useful to create a controller when a user specifies a path to an entry in the BROWSER environment variable -- we can copy a general controller to operate using a specific installation of the desired browser in this way. If we can't create a controller in this way, or if there is no executable for the requested browser, return [None, None]. iiiÿÿÿÿN( Rt _iscommandRtostpathtbasenameRR RtcopyR R(RRtcmdR Rt controllerR&((s"/usr/lib64/python2.6/webbrowser.pyRGs"        itwincCse|iƒ}tii|ƒo|idƒotSx*dD]"}tii||ƒotSq;WtS(Ns.exes.bat(s.exes.bat(s.exes.bat(R R#R$tisfiletendswithRR(R'text((s"/usr/lib64/python2.6/webbrowser.pyt _isexecutablehs # cCs`tii|ƒoIti|ƒti}|ti@p|ti@p|ti@otSnt S(N( R#R$R*tstattST_MODEtS_IXUSRtS_IXGRPtS_IXOTHRR(R'tmode((s"/usr/lib64/python2.6/webbrowser.pyR-qs * cCsxt|ƒotStiidƒ}|ptSxA|itiƒD]-}tii ||ƒ}t|ƒotSqCWtS(sSReturn True if cmd is executable or can be found on the executable search path.tPATH( R-RR#tenvironRRRtpathsepR$tjoin(R'R$tdtexe((s"/usr/lib64/python2.6/webbrowser.pyR"xs   t BaseBrowsercBsDeZdZdgZdd„Zddd„Zd„Zd„ZRS( s3Parent class for all browsers. Do not use directly.s%stcCs||_||_dS(N(R R%(tselfR ((s"/usr/lib64/python2.6/webbrowser.pyt__init__Žs iicCs t‚dS(N(tNotImplementedError(R<RR R!((s"/usr/lib64/python2.6/webbrowser.pyR’scCs|i|dƒS(Ni(R(R<R((s"/usr/lib64/python2.6/webbrowser.pyR•scCs|i|dƒS(Ni(R(R<R((s"/usr/lib64/python2.6/webbrowser.pyR˜s(RRt__doc__targsR=RRR(((s"/usr/lib64/python2.6/webbrowser.pyR:‰s    RcBs&eZdZd„Zddd„ZRS(sVClass for all browsers started with a command and without remote functionality.cCs_t|tƒo||_dg|_n|d|_|d|_tii|iƒ|_dS(Ns%sii(t isinstancet basestringR R@R#R$R%(R<R ((s"/usr/lib64/python2.6/webbrowser.pyR= s    iic Cs |igg}|iD]}||id|ƒq~}yKtid djoti|ƒ}nti|dtƒ}|iƒ SWnt j ot SXdS(Ns%siR)t close_fds( R R@treplacetsystplatformt subprocesstPopenRtwaittOSErrorR(R<RR R!t_[1]targtcmdlinetp((s"/usr/lib64/python2.6/webbrowser.pyRªs*(RRR?R=R(((s"/usr/lib64/python2.6/webbrowser.pyRœs RcBseZdZddd„ZRS(sHClass for all browsers which are to be started in the background.iic CsÚ|igg}|iD]}||id|ƒq~}y…tid djoti|ƒ}nKttddƒ}|pttddƒ}nti|dt d|ƒ}|i ƒdjSWnt j ot SXdS(Ns%siR)tsetsidtsetpgrpRCt preexec_fn(R R@RDRERFRGRHtgetattrR#RRtpollRJR( R<RR R!RKRLRMRNRO((s"/usr/lib64/python2.6/webbrowser.pyR»s*(RRR?R(((s"/usr/lib64/python2.6/webbrowser.pyR·st UnixBrowsercBsVeZdZdZddgZdZdZdZe Z e Z d„Z ddd„ZRS(s=Parent class for all Unix browsers with remote functionality.s%actions%sc Cs—g}|oA|io7tt|ƒƒ}|i|}|o |g}qNn|ig||}|p |iottidƒ}nd}t tddƒ}|pt tddƒ}nt i |dt d|d|i o|pdd|d|ƒ} |o[tid ƒ| iƒ} | djo/tid ƒ| iƒ} | djot Sn| S|io | iƒdjot StSn | iƒ SdS( Nsr+RORPRCtstdintstdouttstderrRQii(t raise_optstinttboolR t backgroundtfileR#tdevnullRRRRGRHRtredirect_stdoutttimetsleepRSRRI( R<R@tremoteR!t raise_opttoptRMtinoutRORNtrc((s"/usr/lib64/python2.6/webbrowser.pyt_invokeÖs<         iic Cs#|djo |i}nf|djo |i}nL|djo*|idjo |i}q|i}ntdd|ƒ‚g}|iD]%}||id|ƒid|ƒq~}|i|t|ƒ}|pDg} |i D]}| |id|ƒqå~ }|i|t t ƒStSdS(NiiisBad 'new' parameter to open(); sexpected 0, 1, or 2, got %ss%ss%action( t remote_actiontremote_action_newwintremote_action_newtabRRt remote_argsRDRfRR@R( R<RR R!tactionRKRLR@tsuccesst_[2]((s"/usr/lib64/python2.6/webbrowser.pyRs"       50N(RRR?RRXRjRgRhRiRR[RR^RfR(((s"/usr/lib64/python2.6/webbrowser.pyRTËs  ,tMozillacBs>eZdZddgZddgZdZdZdZeZ RS(s-Launcher class for Mozilla/Netscape browsers.s-noraises-raises-remotesopenURL(%s%action)R;s ,new-windows,new-tab( RRR?RXRjRgRhRiRR[(((s"/usr/lib64/python2.6/webbrowser.pyRns  tGaleoncBs8eZdZddgZddgZdZdZeZRS(s,Launcher class for Galeon/Epiphany browsers.s-noraiseR;s%actions%ss-ns-w( RRR?RXRjRgRhRR[(((s"/usr/lib64/python2.6/webbrowser.pyRo*s   tOperacBs>eZdZddgZddgZdZdZdZeZ RS(s!Launcher class for Opera browser.R;s-raises-remotesopenURL(%s%action)s ,new-windows ,new-page( RRR?RXRjRgRhRiRR[(((s"/usr/lib64/python2.6/webbrowser.pyRp5s  tElinkscBs8eZdZddgZdZdZdZeZeZ RS(s#Launcher class for Elinks browsers.s-remotesopenURL(%s%action)R;s ,new-windows,new-tab( RRR?RjRgRhRiRR[R^(((s"/usr/lib64/python2.6/webbrowser.pyRqAs t KonquerorcBseZdZddd„ZRS(s±Controller for the KDE File Manager (kfm, or Konqueror). See the output of ``kfmclient --commands`` for more information on the Konqueror remote-control interface. iicCsƒ|djo d}nd}ttidƒ}ttddƒ}|pttddƒ}ny4tid||gdtd |d |d |ƒ}Wntj onX|i ƒtSy:tid d |gdtd |d |d |d|ƒ}Wntj onX|i ƒdjotSy:tidd|gdtd |d |d |d|ƒ}Wntj ot SX|i ƒdjSdS(NitnewTabtopenURLsr+RORPt kfmclientRCRURVRWt konquerors--silentRQtkfms-d( R\R#R]RRRRGRHRRJRIRSR(R<RR R!RkR]RORN((s"/usr/lib64/python2.6/webbrowser.pyRVs@          (RRR?R(((s"/usr/lib64/python2.6/webbrowser.pyRrOstGrailcBs)eZd„Zd„Zddd„ZRS(c Csddk}ddk}ddk}ddk}tii|iƒdƒ}|iti ƒƒd}tii||dƒ}|i|ƒ}|pdS|i|i |i ƒ} xc|D][} y| i | ƒWn=|ij o.yti| ƒWqtj oqXq·X| Sq·WdS(Niÿÿÿÿs .grail-unixis-*(tglobtpwdtsocketttempfileR#R$R7t gettempdirtgetpwuidtgetuidRtAF_UNIXt SOCK_STREAMtconnectterrortunlinktIOError( R<RyRzR{R|ttempdirtusertfilenametmaybeststfn((s"/usr/lib64/python2.6/webbrowser.pyt_find_grail_rcŒs,      cCs3|iƒ}|pdS|i|ƒ|iƒdS(Nii(RŒtsendtclose(R<RkRŠ((s"/usr/lib64/python2.6/webbrowser.pyt_remote¦s    iicCs5|o|id|ƒ}n|id|ƒ}|S(NsLOADNEW sLOAD (R(R<RR R!tok((s"/usr/lib64/python2.6/webbrowser.pyR®s(RRRŒRR(((s"/usr/lib64/python2.6/webbrowser.pyRxˆs  c CsÆdtijo'tdƒotddtdƒƒndtijo'tdƒotdttdƒƒnx5dD]-}t|ƒot|dt|ƒƒququWtd ƒotd ttd ƒƒn(td ƒotd ttd ƒƒnx5dD]-}t|ƒot|dt|ƒƒqûqûWtdƒotddtdƒƒntdƒotddt dƒƒntdƒotddtdƒƒntdƒotdt dƒndS(NtGNOME_DESKTOP_SESSION_IDs gnome-opentKDE_FULL_SESSIONRusmozilla-firefoxtfirefoxsmozilla-firebirdtfirebirdt seamonkeytmozillatnetscapeRwRvtgaleontepiphanyt skipstonetoperatmosaictgrail(smozilla-firefoxR“smozilla-firebirdR”R•R–R—(R˜R™( R#R5R"RRRRrRnRoRpRx(R((s"/usr/lib64/python2.6/webbrowser.pytregister_X_browsers½s4        tDISPLAYtTERMtlinkstelinkstlynxtw3mtWindowsDefaultcBseZddd„ZRS(iicCs0yti|ƒWntj otSXtSdS(N(R#t startfilet WindowsErrorRR(R<RR R!((s"/usr/lib64/python2.6/webbrowser.pyRs (RRR(((s"/usr/lib64/python2.6/webbrowser.pyR¥sswindows-defaultt PROGRAMFILESsC:\Program FilessInternet Explorer\IEXPLORE.EXER“R”R•R–R—R›tInternetConfigcBseZddd„ZRS(iicCsti|ƒtS(N(tict launchurlR(R<RR R!((s"/usr/lib64/python2.6/webbrowser.pyR#s (RRR(((s"/usr/lib64/python2.6/webbrowser.pyR©"ssinternet-configRtdarwintMacOSXcBs&eZdZd„Zddd„ZRS(s{Launcher class for Aqua browsers on Mac OS X Optionally specify a browser name on instantiation. Note that this will not work for Aqua browsers if the user has moved the application package after installation. If no browser is specified, the default browser, as specified in the Internet System Preferences panel, will be used. cCs ||_dS(N(R (R<R ((s"/usr/lib64/python2.6/webbrowser.pyR=5siic Csd|jpt‚d|jod|}ntt|ƒƒ}|idjod|iddƒ}nU|idjo d }nd |d }d |iddƒ}d |i||f}tiddƒ}|djotS|i |ƒ|i ƒ}| S(Nt't:sfile:tdefaultsopen location "%s"t"s%22tOmniWebR;s toWindow %dis OpenURL "%s"s‰tell application "%s" activate %s %s end tellt osascripttw( tAssertionErrorRYRZR RDR#tpopenRRtwriteRŽ( R<RR R!tscriptttoWindowR'tosapipeRe((s"/usr/lib64/python2.6/webbrowser.pyR8s"     (RRR?R=R(((s"/usr/lib64/python2.6/webbrowser.pyR­+s  R°tos2t os2netscapetstarts%stBROWSERR;c Csddk}dtid}y#|itiddƒ\}}Wn?|ij o0}ti|IJti|IJtidƒnXd}xB|D]:\}}|djo d}q|djo d}qqWt|ƒdjoti|IJtidƒn|d}t||ƒd GHdS( NiÿÿÿÿsDUsage: %s [-n | -t] url -n: open new window -t: open new tabiitntds-ns-tis(tgetoptREtargvRƒRWtexittlenR( RÀtusagetoptsR@tmsgtnew_wintotaR((s"/usr/lib64/python2.6/webbrowser.pytmain}s* #        t__main__(5R?R#RRER.RGR_t__all__t ExceptionRRR RRRRRRRRFR-R"tobjectR:RRRTRntNetscapeRoRpRqRrRxRžR5R¥R$R7tiexploreRRªt ImportErrorR©R­RR6t _userchoicestreverseRMR'RÊR(((s"/usr/lib64/python2.6/webbrowser.pyts¨            P   95 -          "0!   %