403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/gedit/plugins/commander/modules/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/gedit/plugins/commander/modules/__pycache__/align.cpython-310.pyc
o

j
b�"�@s|ddlmZddlZddlZddlZddlmZddlZdZ	dd�Z
Gdd�d�Zdd	�Zdd
d�Z
ddd�Zddd�ZdS)�N)�reduceTcCspt|���|dkr
d}n|}t|���|dkrd}n|}|�|�|�|�ks2|�|�|�|�kr4|}||fS)N�r)�len�groups�start�end)�m�group�add_ws_group�gidx�wsidx�r
�3/usr/share/gedit/plugins/commander/modules/align.py�_get_groups s(rc@s>eZdZdd�Zdd�Zddd�Zdd	�Zd
d�Zdd
�ZdS)�LinecCsN||_||_t|�|��|_|jst|�|_dS|d|jd�d��|_dS�Nr)�tabwidth�line�list�finditer�matches�str�newliner)�selfr�regrr
r
r�__init__2sz
Line.__init__cCs
t|j�S�N)rr�rr
r
r�matches_lenBs
zLine.matches_len�cCst|j|�|j��Sr)rr�
expandtabsr)r�extrar
r
r�new_lenEszLine.new_lencCs||��krdS|j|Sr)rr)r�idxr
r
r�matchHs
z
Line.matchcCs|�|�}|dkrdSt|||�\}}|j|j|�d�|�|��7_|j|�|�|�|��}|j|�|�|�|��}	d}
	||
|	}|�|�|krT|
d7}
nnqB|j|7_|�|d�}|dkrkd}
n|�d�}
|j|j|�|�|
�7_dS)NrrT� r)r$rrrrrr")rr#�numr	r
rrr�prefix�suffix�sp�bridge�mnext�endidxr
r
r�appendNs(
$
�
"zLine.appendcCs|jSr�rrr
r
r�__str__rszLine.__str__N)r)	�__name__�
__module__�__qualname__rrr"r$r-r/r
r
r
rr1s
$rcCs�d}|D]=}|�|�}|dkr7t|||�\}}|j|�d�|�|��|j|�|�|�|��}	|�|	�}
n|��}
|
|krA|
}q|Sr)r$rrrrr")�linesr#r	r
r&rrrrr!�lr
r
r�_find_max_alignus
4�r5c
#s��|��}|��}|s'|�|���}|�d�|��}	|	��s#|	��||	f}|d�|d�sH|d�	�rH|d�
�|d��sH|d���dkrWtjj
�d�V\�}
}zt��|��Wntyu}z
tjj�d|f��d}~ww|dkr�tjj
�d�V\}}
}zt|�}Wnd}Y|dkr�tjj
�d�V\}}
}zt|�}Wnd}Y|dkr�tjj
�d�V\}}
}zt|�}Wnd}Y|dkr�|}|\}}	|�	�s�|�d�|	��s�|	��|�|	���}
g}d}|�����fd	d
�|
D�}tdd�|d�}t|�D]}t||||�}|D]
}|�|||||��q�q
t�d
dd
�|D��}|��|�|d|d�|� d|dd�}|�!|d|�|�"|�|�|d�|�#|�|�$�tjj
j%VdS)NrrzRegex:z(Failed to compile regular expression: %sz
Group (1):zAdditional whitespace (0):zWhitespace group (1):���csg|]}t|����qSr
)r)�.0r�rrr
r�
<listcomp>�sz_regex.<locals>.<listcomp>cSst||���Sr)�maxr)�x�yr
r
r�<lambda>�sz_regex.<locals>.<lambda>�
cSsg|]}|j�qSr
r.)r7r;r
r
rr9�sT)&�
get_buffer�get_selection_bounds�get_iter_at_mark�
get_insert�set_line_offset�copy�	ends_line�forward_to_line_end�equal�starts_line�
backward_line�	commander�commands�result�Prompt�re�compile�	Exception�
exceptions�Execute�int�get_text�
splitlines�
get_tab_widthr�ranger5r-r�join�begin_user_action�delete�create_mark�insert�select_range�delete_mark�end_user_action�DONE)�viewrr	�
additional_wsr
�flags�buf�boundsrr�words�modifier�er3�newlinesr&�i�alr�alignedrr
r8r�_regex�s��
��
�
rm�\s+rr6ccs�t|||||�VdS)aAlign selected in columns using a regular expression: align.regex [&lt;regex&gt;=<i>\s+</i>] [&lt;align-group&gt;] [&lt;padding&gt;] [&lt;padding-group&gt;=<i>&lt;align-group&gt;</i>]

Align the selected text in columns separated by the specified regular expression.

The optional &lt;align-group&gt; argument specifies on which group in the regular expression
the text should be aligned and defaults to 1 (or 0 in the case that there is
no explicit group specified). The &lt;align-group&gt; will be <b>replaced</b>
with whitespace to align the columns. The optional &lt;padding&gt; argument can
be used to add additional whitespace to the column separation. The last
optional argument (&lt;padding-group&gt;) can be used to specify a separate
group (which must be contained in &lt;align-group&gt;) which to replace with
whitespace.

The regular expression will be matched in case-sensitive modeN)rm�rar�align_group�padding�
padding_groupr
r
r�__default__�s�rsccs�t|||||tj�VdS)a�Align selected in columns using a regular expression: align.regex [&lt;regex&gt;=<i>\s+</i>] [&lt;align-group&gt;] [&lt;padding&gt;] [&lt;padding-group&gt;=<i>&lt;align-group&gt;</i>]

Align the selected text in columns separated by the specified regular expression.

The optional &lt;align-group&gt; argument specifies on which group in the regular expression
the text should be aligned and defaults to 1 (or 0 in the case that there is
no explicit group specified). The &lt;align-group&gt; will be <b>replaced</b>
with whitespace to align the columns. The optional &lt;padding&gt; argument can
be used to add additional whitespace to the column separation. The last
optional argument (&lt;padding-group&gt;) can be used to specify a separate
group (which must be contained in &lt;align-group&gt;) which to replace with
whitespace.

The regular expression will be matched in case-insensitive modeN)rmrN�
IGNORECASEror
r
rrj	s�rj)r)rnrrr6)�commander.commandsrK�commander.commands.completionrJ�commander.commands.result�commander.commands.exceptions�	functoolsrrN�__commander_module__rrr5rmrsrjr
r
r
r�<module>sD

k

Youez - 2016 - github.com/yon3zu
LinuXploit