%PDF- %PDF-
Direktori : /usr/lib/python3.12/email/__pycache__/ |
Current File : //usr/lib/python3.12/email/__pycache__/feedparser.cpython-312.pyc |
� ���fY � �R � d Z ddgZddlZddlmZ ddlmZ ddlmZ ddl m Z ej d � Z ej d � Z ej d� Z ej d � Z ej d� Zd ZdZ e� Z G d� de� Z G d� d� Z G d� de� Zy)a FeedParser - 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)�compat32)�deque)�StringIOz \r\n|\r|\nz(\r\n|\r|\n)z(\r\n|\r|\n)\Zz%^(From |[\041-\071\073-\176]*:|[\t ])� � c �L � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z y) �BufferedSubFileak A 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. c �` � t d�� | _ t � | _ g | _ d| _ y )Nr )�newlineF)r �_partialr �_lines� _eofstack�_closed��selfs �'/usr/lib/python3.12/email/feedparser.py�__init__zBufferedSubFile.__init__4 s'