$87 GRAYBYTE WORDPRESS FILE MANAGER $33

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python34/lib64/python3.4/email/__pycache__/

HOME
Current File : /opt/alt/python34/lib64/python3.4/email/__pycache__//feedparser.cpython-34.pyc
�
e fmY�@s�dZddgZddlZddlmZddlmZddlmZejd�Z	ejd	�Z
ejd
�Zejd	�Zejd�Z
dZd
Ze�ZGdd�de�ZGdd�d�ZGdd�de�ZdS)aFeedParser - An email feed parser.

The feed parser implements an interface for incrementally parsing an email
message, line by line.  This has advantages for certain applications, such as
those reading email messages off a socket.

FeedParser.feed() is the primary interface for pushing new data into the
parser.  It returns when there's nothing more it can do with the available
data.  When you have no more data to push into the parser, call .close().
This completes the parsing and returns the root message object.

The other advantage of this parser is that it will never raise a parsing
exception.  Instead, when it finds something unexpected, it adds a 'defect' to
the current message.  Defects are just instances that live on the message
object's .defects attribute.
�
FeedParser�BytesFeedParser�N)�errors)�message)�compat32z
|
|
z(
|
|
)z
(
|
|
)\Zz%^(From |[\041-\071\073-\176]*:|[\t ])��
c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�BufferedSubFileakA file-ish object that can have new data loaded into it.

    You can also push and pop line-matching predicates onto a stack.  When the
    current predicate matches the current line, a false EOF response
    (i.e. empty string) is returned instead.  This lets the parser adhere to a
    simple abstraction -- it parses until EOF closes the current message.
    cCs(g|_g|_g|_d|_dS)NF)�_partial�_lines�	_eofstack�_closed)�self�r�5/opt/alt/python34/lib64/python3.4/email/feedparser.py�__init__4s			zBufferedSubFile.__init__cCs|jj|�dS)N)r�append)rZpredrrr�push_eof_matcher>sz BufferedSubFile.push_eof_matchercCs
|jj�S)N)r�pop)rrrr�pop_eof_matcherAszBufferedSubFile.pop_eof_matchercCs8|jdj|j�jd��g|_d|_dS)NrT)�	pushlines�joinr
�
splitlinesr
)rrrr�closeDs"	zBufferedSubFile.closecCsn|js|jrdStS|jj�}x>|jddd�D]&}||�r@|jj|�dSq@W|S)Nr����)rr
�NeedMoreDatarrr)r�lineZateofrrr�readlineJs		zBufferedSubFile.readlinecCs&|tk	st�|jj|�dS)N)r�AssertionErrorrr)rrrrr�
unreadline\szBufferedSubFile.unreadlinecCs�|jd�}|s*|djd�r=|j|7_dS|jr�|jj|d�dj|j�jd�|dd�<|jdd�=n|d	jd�s�|j�g|_n|j|�dS)
z$Push some new data into this object.Trr�
Nrr)rr!r)r�endswithr
rrrr)r�data�partsrrr�pushas	%zBufferedSubFile.pushcCs$|ddd�|jdd�<dS)Nrrr)r)r�linesrrrryszBufferedSubFile.pushlinescCs|S)Nr)rrrr�__iter__}szBufferedSubFile.__iter__cCs%|j�}|dkr!t�n|S)Nr)r�
StopIteration)rrrrr�__next__�s	zBufferedSubFile.__next__N)�__name__�
__module__�__qualname__�__doc__rrrrrr r%rr'r)rrrrr	,s
r	c@s�eZdZdZddedd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)rzA feed-style parser of email.N�policycs�|�_�fdd��_|dkrW�jtkrHtj�_q�tj�_nA|�_y|d�j�Wn!tk
r�dd��_YnXt��_	g�_
�j�j�_
d�_d�_d�_dS)a_factory is called with no arguments to create a new message obj

        The policy keyword specifies a policy object that controls a number of
        aspects of the parser's operation.  The default policy maintains
        backward compatibility.

        csi�jd6S)Nr.)r.r)rrr�<lambda>�sz%FeedParser.__init__.<locals>.<lambda>Nr.cSsiS)Nrrrrrr/�sF)r.�
_factory_kwdsrrZMessage�_factoryZEmailMessage�	TypeErrorr	�_input�	_msgstack�	_parsegenr)�_parse�_cur�_last�_headersonly)rr1r.r)rrr�s"		
			zFeedParser.__init__cCs
d|_dS)NT)r9)rrrr�_set_headersonly�szFeedParser._set_headersonlycCs|jj|�|j�dS)zPush more data into the parser.N)r3r%�_call_parse)rr#rrr�feed�szFeedParser.feedcCs'y|j�Wntk
r"YnXdS)N)r6r()rrrrr;�s
zFeedParser._call_parsecCsx|jj�|j�|j�}|js3t�|j�dkrt|j�rttj	�}|j
j||�n|S)z<Parse all remaining data and return the root message object.�	multipart)r3rr;�_pop_messager4r�get_content_maintypeZis_multipartrZ!MultipartInvariantViolationDefectr.�
handle_defect)r�root�defectrrrr�s


zFeedParser.closecCs�|j|j��}|jrC|jj�dkrC|jd�n|jrc|jdj|�n|jj|�||_||_dS)Nzmultipart/digestzmessage/rfc822rr)	r1r0r7�get_content_typeZset_default_typer4Zattachrr8)r�msgrrr�_new_message�s		zFeedParser._new_messagecCs8|jj�}|jr+|jd|_n	d|_|S)Nrr)r4rr7)r�retvalrrrr>�s
		zFeedParser._pop_messageccs4|j�g}x�|jD]�}|tkr7tVqntj|�s�tj|�s�tj�}|jj	|j
|�|jj|�nPn|j|�qW|j
|�|jr"g}xG|jj�}|tkr�tVq�n|dkr�Pn|j|�q�W|j
jtj|��dS|j
j�dkrx�|jjtj�x,|j�D]}|tkrwtVqZnPqZW|j�}|jj�x+|jj�}|tkr�tVq�nPq�Wx+|jj�}|tkr�tVq�nPq�W|dkrPn|jj|�q:WdS|j
j�dkrkx,|j�D]}|tkrXtVq;nPq;W|j�dS|j
j�dkr�|j
j�}|dkrtj�}|jj	|j
|�g}x5|jD]*}|tkr�tVq�n|j|�q�W|j
jtj|��dS|j
jdd�j�dkr^tj�}|jj	|j
|�nd	|}tjd
tj |�d�}	d}
g}d
}d
}
x�|jj�}|tkr�tVq�n|dkr�Pn|	j|�}|rN|j!d�rd}
|j!d�}Pn|
r�|r�|d}t"j#|�}|rh|dt$|j!d���|d<ntj|�|j
_%nd
}
|jj|�q�nxS|jj�}|tkr�tVq�n|	j|�}|s�|jj|�Pq�q�W|jj|	j�x,|j�D]}|tkr/tVqnPqW|j&j�dkr�|j&j'}|dkrpd|j&_'q(|dk	r(t"j#|�}|r�t$|j!d��}|d|�|j&_'q�q(nb|j&j(}t)|t*�r(t"j#|�}|r(|dt$|j!d���}||j&_(q(n|jj�|j�|j
|_&q�|
sZt+�|j|�q�W|
r�tj,�}|jj	|j
|�|j
jtj|��g}x(|jD]}|tkr�tVq�q�q�Wtj|�|j
_'dS|
s"tj-�}|jj	|j
|�dS|r4dg}ng}x5|jD]*}|tkratVqDn|j|�qDW|r�|d}t.j|�}|r�|t$|j!d��d�|d<q�ntj|�|j
_'dSg}x5|jD]*}|tkrtVq�n|j|�q�W|j
jtj|��dS)Nrzmessage/delivery-statusrr=zcontent-transfer-encoding�8bit�7bit�binaryz--z(?P<sep>z4)(?P<end>--)?(?P<ws>[ \t]*)(?P<linesep>\r\n|\r|\n)?$TF�end�lineseprr)rHrGrIrr)/rEr3r�headerRE�match�NLCRErZ MissingHeaderBodySeparatorDefectr.r@r7r r�_parse_headersr9rZset_payload�EMPTYSTRINGrrCrr5r>rr?Zget_boundaryZNoBoundaryInMultipartDefect�get�lowerZ-InvalidMultipartContentTransferEncodingDefect�re�compile�escape�group�	NLCRE_eol�search�len�preambler8�epilogueZ_payload�
isinstance�strrZStartBoundaryNotFoundDefectZCloseBoundaryNotFoundDefect�	NLCRE_bol)rZheadersrrBr&rFrD�boundaryZ	separatorZ
boundaryreZcapturing_preamblerZrKZclose_boundary_seen�moZlastlineZeolmor[rJZpayload�	firstlineZbolmorrrr5�sh

	

	


'  



)zFeedParser._parsegenc	Csd}g}x�t|�D]�\}}|ddkry|sftj|�}|jj|j|�qn|j|�qn|r�|jj|jj|��dg}}n|j	d�rf|dkrt
j|�}|r�|dt|j
d���}n|jj|�qqf|t|�dkr>|jj|�dStj|�}|jjj|�qn|jd�}|dkr�tjd�}|jjj|�qn|dks�td��|d|�}|g}qW|r|jj|jj|��ndS)	Nrrz 	zFrom r�:zMissing header name.z3_parse_headers fed line with no : and no leading WS)�	enumeraterZ#FirstHeaderLineIsContinuationDefectr.r@r7rZset_rawZheader_source_parse�
startswithrWrXrYrVZset_unixfromr3r ZMisplacedEnvelopeHeaderDefectZdefects�findZInvalidHeaderDefectr)	rr&Z
lastheaderZ	lastvalue�linenorrBr`�irrrrO�sH
#
zFeedParser._parse_headers)r*r+r,r-rrr:r<r;rrEr>r5rOrrrrr�s!

�cs(eZdZdZ�fdd�Z�S)rz(Like FeedParser, but feed accepts bytes.cs t�j|jdd��dS)N�ascii�surrogateescape)�superr<�decode)rr#)�	__class__rrr<szBytesFeedParser.feed)r*r+r,r-r<rr)rlrrs)r-�__all__rSZemailrrZemail._policybaserrTrNr^rWZNLCRE_crackrLrP�NL�objectrr	rrrrrr�<module>s"	\��


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
24 May 2024 8.33 AM
root / linksafe
0755
__init__.cpython-34.pyc
1.747 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
__init__.cpython-34.pyo
1.747 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_encoded_words.cpython-34.pyc
5.928 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_encoded_words.cpython-34.pyo
5.928 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_header_value_parser.cpython-34.pyc
85.671 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_header_value_parser.cpython-34.pyo
85.614 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_parseaddr.cpython-34.pyc
13.518 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_parseaddr.cpython-34.pyo
13.518 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_policybase.cpython-34.pyc
14.488 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
_policybase.cpython-34.pyo
14.488 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
base64mime.cpython-34.pyc
3.299 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
base64mime.cpython-34.pyo
3.299 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
charset.cpython-34.pyc
11.971 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
charset.cpython-34.pyo
11.928 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
contentmanager.cpython-34.pyc
7.961 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
contentmanager.cpython-34.pyo
7.961 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
encoders.cpython-34.pyc
1.703 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
encoders.cpython-34.pyo
1.703 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
errors.cpython-34.pyc
6.131 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
errors.cpython-34.pyo
6.131 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
feedparser.cpython-34.pyc
11.563 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
feedparser.cpython-34.pyo
11.396 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
generator.cpython-34.pyc
13.273 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
generator.cpython-34.pyo
13.273 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
header.cpython-34.pyc
17.502 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
header.cpython-34.pyo
17.502 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
headerregistry.cpython-34.pyc
22.113 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
headerregistry.cpython-34.pyo
22.054 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
iterators.cpython-34.pyc
1.998 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
iterators.cpython-34.pyo
1.998 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
message.cpython-34.pyc
38.762 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
message.cpython-34.pyo
38.762 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
parser.cpython-34.pyc
5.779 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
parser.cpython-34.pyo
5.779 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
policy.cpython-34.pyc
8.879 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
policy.cpython-34.pyo
8.879 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
quoprimime.cpython-34.pyc
7.937 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
quoprimime.cpython-34.pyo
7.937 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
utils.cpython-34.pyc
10.251 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
utils.cpython-34.pyo
10.251 KB
17 Apr 2024 5.10 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF