uawdijnntqw1x1x1
IP : 3.140.195.8
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
..
/
lib64
/
bind
/
.
/
..
/
gio
/
.
/
..
/
games
/
..
/
python3.6
/
__pycache__
/
webbrowser.cpython-36.pyc
/
/
3 \U�@s�dZddlZddlZddlZddlZddlZddddddgZGd d�de�ZiZ gZ dOdd�ZdPdd�ZdQdd�Z dd�Zdd�ZdRdd�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZeZGd#d$�d$e�ZGd%d&�d&e�ZGd'd(�d(e�ZGd)d*�d*e�Zd+d,�Zej jd-��rle�ej jd.��rej!d/��r�ed/ded/��ej!d0��r�ed0ded0��ej!d1��r�ed1ded1��ej!d2��r�ed2ded2��ej!d3��red3ded3��ej"dd4�d5k�r�Gd6d7�d7e�Z#gZ iZ ed8e#�ej$j%ej jd9d:�d;�Z&x8d<d=d>d?d@dAe&fD]"Z'ej!e'��rhee'dee'���qhWej"dBk�rGdCdD�dDe�Z(GdEdF�dFe�Z)edGde)dG�dS�ed<de)d<�dT�edHde)dH�dU�edDde)dI�dV�dJej k�rtej dJj*ej+�Z,e,j-�xBe,D]:Z.e.dKk�r.ee.dW�Z/e/d dk�r.ee.dee.�dX��q.WdZ.[.[,dLdM�Z0e1dNk�r�e0�dS)Yz?Interfaces for launching and remotely controlling Web browsers.�N�Error�open�open_new�open_new_tab�get�registerc@seZdZdS)rN)�__name__� __module__�__qualname__�rr�"/usr/lib64/python3.6/webbrowser.pyr s�cCs<||gt|j�<|dkr$tj|�n|dkr8tjd|�dS)z9Register a browser connector and, optionally, connection.rN)� _browsers�lower� _tryorder�append�insert)�name�klass�instance�update_tryorderrrrrs cCs�|dk r|g}nt}x�|D]�}d|krVtj|�}|ddkrLt|dd��St|�Sqyt|j�}Wntk r�t|�}YnX|ddk r�|dS|ddk r|d�SqWt d��dS) zCReturn a browser launcher instance appropriate for the environment.Nz%sr �&rz!could not locate runnable browser���r) r�shlex�split�BackgroundBrowser�GenericBrowserrr�KeyError�_synthesizer)ZusingZalternatives�browser�commandrrrrs$ TcCs,x&tD]}t|�}|j|||�rdSqWdS)NTF)rrr)�url�new� autoraiserrrrrr9s cCs t|d�S)Nr )r)r!rrrr@scCs t|d�S)N�)r)r!rrrrCsc Cs�|j�d}tj|�sddgStjj|�}yt|j�}Wntk rRddgSX|d}|r�|j�|jkr�ddl }|j |�}||_ tjj|�|_t|d||�d|gSddgS)a�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]. rNr )r�shutil�which�os�path�basenamerrr�copyrr)rr�cmdrr Z controllerr*rrrrGs" rc@s:eZdZdZdgZddd�Zddd �Zd d�Zdd �ZdS)�BaseBrowserz3Parent class for all browsers. Do not use directly.z%s�cCs||_||_dS)N)rr))�selfrrrr�__init__nszBaseBrowser.__init__rTcCst�dS)N)�NotImplementedError)r.r!r"r#rrrrrszBaseBrowser.opencCs|j|d�S)Nr )r)r.r!rrrruszBaseBrowser.open_newcCs|j|d�S)Nr$)r)r.r!rrrrxszBaseBrowser.open_new_tabN)r-)rT) rr r �__doc__�argsr/rrrrrrrr,is r,c@s"eZdZdZdd�Zd dd�ZdS) rzVClass for all browsers started with a command and without remote functionality.cCsFt|t�r||_dg|_n|d|_|dd�|_tjj|j�|_dS)Nz%srr )� isinstance�strrr2r'r(r))r.rrrrr/�s zGenericBrowser.__init__rTcsl|jg�fdd�|jD�}y6tjdd�dkr<tj|�}ntj|dd�}|j�Stk rfdSXdS)Ncsg|]}|jd���qS)z%s)�replace)�.0�arg)r!rr� <listcomp>�sz'GenericBrowser.open.<locals>.<listcomp>��winT)� close_fdsF)rr2�sys�platform� subprocess�Popen�wait�OSError)r.r!r"r#�cmdline�pr)r!rr�s zGenericBrowser.openN)rT)rr r r1r/rrrrrr|s rc@seZdZdZddd�ZdS)rzHClass for all browsers which are to be started in the background.rTcsp|jg�fdd�|jD�}y:tjdd�dkr<tj|�}ntj|ddd�}|j�dkStk rjdSXdS)Ncsg|]}|jd���qS)z%s)r5)r6r7)r!rrr8�sz*BackgroundBrowser.open.<locals>.<listcomp>r9r:T)r;�start_new_sessionF)rr2r<r=r>r?�pollrA)r.r!r"r#rBrCr)r!rr�szBackgroundBrowser.openN)rT)rr r r1rrrrrr�src@sBeZdZdZdZdZdZddgZdZdZ dZ dd�Zdd d�ZdS) �UnixBrowserz=Parent class for all Unix browsers with remote functionality.NFTz%actionz%sc Cs�g}|r*|jr*t|�}|j|}|r*|g}|jg||}|sD|jrLtj}nd}tj|d||jrd|pfd|dd�}|r�y|jd�} | Stj k r�dSXn&|jr�|j �dkr�dSdSn |j�SdS)NT)r;�stdin�stdout�stderrrD�F)� raise_opts�intr� backgroundr>�DEVNULLr?�redirect_stdoutr@ZTimeoutExpiredrE) r.r2Zremoter#Z raise_opt�optrBZinoutrC�rcrrr�_invoke�s0 zUnixBrowser._invokercs�|dkr|j�nB|dkr |j�n2|dkrB|jdkr:|j�qR|j�ntdd|����fdd�|jD�}dd�|D�}|j|d |�}|s��fd d�|jD�}|j|dd�Sd SdS)Nrr r$zBad 'new' parameter to open(); zexpected 0, 1, or 2, got %scs g|]}|jd��jd���qS)z%sz%action)r5)r6r7)�actionr!rrr8�sz$UnixBrowser.open.<locals>.<listcomp>cSsg|]}|r|�qSrr)r6r7rrrr8�sTcsg|]}|jd���qS)z%s)r5)r6r7)r!rrr8�sF)� remote_action�remote_action_newwin�remote_action_newtabr�remote_argsrRr2)r.r!r"r#r2Zsuccessr)rSr!rr�s$ zUnixBrowser.open)rT) rr r r1rKrMrOrWrTrUrVrRrrrrrrF�s#rFc@s(eZdZdZddgZdZdZdZdZdS) �Mozillaz$Launcher class for Mozilla browsers.z%actionz%sr-z-new-windowz-new-tabTN) rr r r1rWrTrUrVrMrrrrrX�srXc@s0eZdZdZddgZddgZdZdZdZd Z d S)�Netscapez$Launcher class for Netscape browser.z-noraisez-raisez-remotezopenURL(%s%action)r-z,new-windowz,new-tabTN) rr r r1rKrWrTrUrVrMrrrrrYsrYc@s,eZdZdZddgZddgZdZdZdZd S) �Galeonz,Launcher class for Galeon/Epiphany browsers.z-noraiser-z%actionz%sz-nz-wTN) rr r r1rKrWrTrUrMrrrrrZsrZc@s(eZdZdZddgZdZdZdZdZdS)�Chromez)Launcher class for Google Chrome browser.z%actionz%sr-z--new-windowTN) rr r r1rWrTrUrVrMrrrrr[sr[c@s(eZdZdZddgZdZdZdZdZdS)�Operaz!Launcher class for Opera browser.z%actionz%sr-z--new-windowTN) rr r r1rWrTrUrVrMrrrrr\"sr\c@s,eZdZdZddgZdZdZdZdZdZ dS) �Elinksz#Launcher class for Elinks browsers.z-remotezopenURL(%s%action)r-z,new-windowz,new-tabFN) rr r r1rWrTrUrVrMrOrrrrr],sr]c@seZdZdZddd�ZdS)� Konquerorz�Controller for the KDE File Manager (kfm, or Konqueror). See the output of ``kfmclient --commands`` for more information on the Konqueror remote-control interface. rTcCs�|dkrd}nd}tj}ytjd||gd|||d�}Wntk rJYnX|j�dSy tjdd|gd|||dd �}Wntk r�YnX|j�dkr�dSy tjd d|gd|||dd �}Wntk r�dSX|j�dkSdS) Nr$ZnewTabZopenURL� kfmclientT)r;rGrHrI� konquerorz--silent)r;rGrHrIrD�kfmz-dF)r>rNr?rAr@rE)r.r!r"r#rS�devnullrCrrrrAs:zKonqueror.openN)rT)rr r r1rrrrrr^:sr^c@s&eZdZdd�Zdd�Zd dd�Zd S)�GrailcCs�ddl}ddl}ddl}ddl}tjj|j�d�}|jtj ��d}tjj||d�}|j|�}|shdS|j|j |j�} xX|D]P} y| j| �Wn8t k r�ytj| �Wnt k r�YnXYq~X| Sq~WdS)Nrz.grail-unixz-*)�glob�pwd�socket�tempfiler'r(�joinZ gettempdir�getpwuid�getuidZAF_UNIXZSOCK_STREAMZconnectrA�unlink)r.rdrerfrgZtempdir�user�filenameZmaybes�s�fnrrr�_find_grail_rcrs* zGrail._find_grail_rccCs&|j�}|sdS|j|�|j�dS)Nrr )rp�send�close)r.rSrnrrr�_remote�s z Grail._remoterTcCs&|r|jd|�}n|jd|�}|S)NzLOADNEW zLOAD )rs)r.r!r"r#�okrrrr�sz Grail.openN)rT)rr r rprsrrrrrrcnsrccCs�tjd�rtddtd��dtjkr>tjd�r>tddtd��dtjkrbtjd�rbtddtd��dtjkr�tjd�r�tdttd��tjd�r�tddtd��x&dD]}tj|�r�t|dt|��q�Wx&dD]}tj|�r�t|dt|��q�Wtjd��rtdttd��ntjd��r*tdttd��x*dD]"}tj|��r0t|dt |���q0Wtjd��rrtddtd��x*d D]"}tj|��rxt|dt |���qxWtjd��r�tddtd��tjd��r�tddtd��tjd��r�tdtd�dS)!Nzxdg-openZGNOME_DESKTOP_SESSION_IDz gvfs-openz gnome-openZKDE_FULL_SESSIONr_z x-www-browser�firefox� iceweasel�iceape� seamonkey�mozilla-firefox�mozilla-firebird�firebird�mozilla�netscaperar`�galeon�epiphanyZ skipstone� google-chrome�chrome�chromium�chromium-browser�operaZmosaicZgrail)rurvrwrx)ryrzr{r|r})r~r)r�r�r�r�) r%r&rrr'�environr^rXrYrZr[r\rc)rrrr�register_X_browsers�sH r�ZDISPLAYZTERMzwww-browserZlinksZelinksZlynxZw3mr9r:c@seZdZddd�ZdS)�WindowsDefaultrTcCs,ytj|�Wntk r"dSXdSdS)NFT)r'Z startfilerA)r.r!r"r#rrrr�s zWindowsDefault.openN)rT)rr r rrrrrr��sr�zwindows-defaultZPROGRAMFILESzC:\Program FileszInternet Explorer\IEXPLORE.EXErur{rxr|r}r��darwinc@s"eZdZdZdd�Zd dd�ZdS) �MacOSXa{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.rrrrr/&szMacOSX.__init__rTc Cs�d|kst�d|krd|}tt|��}|jdkrDd|jdd�}n<|jdkrTd }nd |d}d|jdd�}d |j||f}tjdd�}|dkr�dS|j|�|j�}|S)N�'�:zfile:�defaultzopen location "%s"�"z%22ZOmniWebr-ztoWindow %dr zOpenURL "%s"z�tell application "%s" activate %s %s end tell� osascript�wF) �AssertionErrorrL�boolrr5r'�popen�writerr) r.r!r"r#�scriptZtoWindowr+�osapiperQrrrr)s" zMacOSX.openN)rT)rr r r1r/rrrrrr�s r�c@seZdZdd�Zddd�ZdS) �MacOSXOSAScriptcCs ||_dS)N)�_name)r.rrrrr/KszMacOSXOSAScript.__init__rTcCsb|jdkrd|jdd�}nd|j|jdd�f}tjdd�}|dkrJdS|j|�|j�}|S) Nr�zopen location "%s"r�z%22z� tell application "%s" activate open location "%s" end r�r�F)r�r5r'r�r�rr)r.r!r"r#r�r�rQrrrrNs zMacOSXOSAScript.openN)rT)rr r r/rrrrrr�Jsr�Zsafarir�r�ZBROWSERr-c Cs�ddl}dtjd}y|jtjdd�d�\}}WnJ|jk r~}z,t|tjd�t|tjd�tjd�WYdd}~XnXd}x*|D]"\}}|dkr�d}q�|dkr�d}q�Wt|�dkr�t|tjd�tjd�|d}t||�td �dS) NrzDUsage: %s [-n | -t] url -n: open new window -t: open new tabr Zntd)�filez-nz-tr$�) �getoptr<�argv�error�printrI�exit�lenr) r�ZusageZoptsr2�msgZnew_win�o�ar!rrr�main~s( r��__main__)Nr )N)rT)r rrrrrr)2r1r'rr%r<r>�__all__� Exceptionrrrrrrrrr�objectr,rrrFrXrYrZr[ZChromiumr\r]r^rcr�r�r&r=r�r(rhZiexplorerr�r�r�pathsepZ_userchoices�reverserBr+r�rrrrr�<module>s� "N 45B .
/home/../lib64/bind/./../gio/./../games/../python3.6/__pycache__/webbrowser.cpython-36.pyc