HEX
Server: Apache/2.4.65 (Unix) OpenSSL/3.5.5
System: Linux cpanel.ns-taberra.com 5.14.0-681.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 20:19:22 UTC 2026 x86_64
User: asif201 (1002)
PHP: 8.3.0
Disabled: NONE
Upload Files
File: //lib64/totem/plugins/pythonconsole/__pycache__/pythonconsole.cpython-39.pyc
a

җeaJ�@s�ddlZddlZe�dd�e�dd�e�dd�e�dd�ddlmZmZmZmZdd	lmZdd
l	m
Z
mZdZzddl
Z
dZWney�d
ZYn0e�d�ejZejZGdd�dejej�ZdS)�N�Gtkz3.0�Peasz1.0ZPango�Totem)�GObjectrrr)�Gio)�
PythonConsole�OutFile)�PythonConsolePluginrrTF�totemc@sReZdZdZejejd�Zdd�Zdd�Z	dd�Z
edd	��Zd
d�Z
dd
�ZdS)r	)�typecCstj�|�d|_d|_dS�N)r�Object�__init__r
�window��self�r�7/usr/lib64/totem/plugins/pythonconsole/pythonconsole.pyrBszPythonConsolePlugin.__init__cCs�|j|_tj�dd�}|�d|j�|j�|�|j�d�}|�	t
d�d�tr�tj�dd�}|�d|j�|j�|�|�	t
d�d�dS)	Nzpython-consoleZactivate�python-console-placeholderz_Python Consolezapp.python-consolezpython-debuggerzPython Debuggerzapp.python-debugger)
�objectr
rZSimpleAction�new�connect�
_show_consoleZ
add_actionZget_menu_section�append�_�
HAVE_RPDB2�_enable_debugging)r�actionZmenurrr�do_activateHszPythonConsolePlugin.do_activatecCs�|js�ttt|jd�|jd�}|�dd�|�dtd�d�t	�
�|_|j�td��|j�|�|j�
d	|j�|j��n|j��|j��dS)
N)�__builtins__rZtotem_object)�	namespaceZ
destroy_cbiXi�zprint("%s" %% totem_object)u@You can access the Totem.Object through “totem_object” :\n%sFzTotem Python Console�destroy)rrrrr
�_destroy_consoleZset_size_request�evalrrZWindowZ	set_title�addrZshow_allZ
grab_focus)rZ	parameter�_action�consolerrrrXs&���

z!PythonConsolePlugin._show_consolec	Csptd�}t�ddtjjtjj|�}|��tjj	krdd}t
j�|�}|�
d�pNd}dd�}t�||�|��dS)Nu�After you press OK, Totem will wait until you connect to it with winpdb or rpdb2. If you have not set a debugger password in DConf, it will use the default password (“totem”).rz%org.gnome.totem.plugins.pythonconsolezrpdb2-passwordr
cSst�|�dS)NF)�rpdb2Zstart_embedded_debugger)�passwordrrr�start_debuggerys
z=PythonConsolePlugin._enable_debugging.<locals>.start_debugger)rrZ
MessageDialogZMessageType�INFOZButtonsTypeZ	OK_CANCEL�runZResponseTypeZOKrZSettingsrZ
get_stringrZidle_addr!)	�clsZparamr%�msgZdialogZschemaZsettingsr(r)rrrrms�z%PythonConsolePlugin._enable_debuggingcGs|j��d|_dSr)rr!)r�_argsrrrr"�s
z$PythonConsolePlugin._destroy_consolecCs$|j�d�|jdur |j��dS)Nr)r
Zempty_menu_sectionrr!rrrr�
do_deactivate�s
z!PythonConsolePlugin.do_deactivateN)�__name__�
__module__�__qualname__Z__gtype_name__r�propertyr
rrrr�classmethodrr"r/rrrrr	=s
r	)�gettextZgiZrequire_versionZ
gi.repositoryrrrrrr&rr�__all__r'r�ImportError�
textdomain�dgettextZD_rr
ZActivatabler	rrrr�<module>#s$