Current Path : /usr/local/lib/python2.5/email/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/local/lib/python2.5/email/feedparser.pyc |
³ò h”Rc @ sÈ d Z d g Z d d k Z d d k l Z d d k l Z e i d ƒ Z e i d ƒ Z e i d ƒ Z e i d ƒ Z e i d ƒ Z d Z d Z e ƒ Z d e f d „ ƒ YZ d d d „ ƒ YZ d S( s 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 throw 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. t FeedParseriÿÿÿÿN( t errors( t messages | | s ( | | )s ( | | )$s( ^(From |[\041-\071\073-\176]{1,}:|[\t ])t s t BufferedSubFilec B sq e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( sk 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 C s( d | _ g | _ g | _ t | _ d S( NR ( t _partialt _linest _eofstackt Falset _closed( t self( ( s, /usr/local/lib/python2.5/email/feedparser.pyt __init__3 s c C s | i i | ƒ d S( N( R t append( R t pred( ( s, /usr/local/lib/python2.5/email/feedparser.pyt push_eof_matcher= s c C s | i i ƒ S( N( R t pop( R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyt pop_eof_matcher@ s c C s) | i i | i ƒ d | _ t | _ d S( NR ( R R R t TrueR ( R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyt closeC s c C s} | i p | i o d Sn t Sn | i i ƒ } xC | i d d d … D]+ } | | ƒ o | i i | ƒ d SqJ qJ W| S( NR iÿÿÿÿ( R R t NeedMoreDataR R R ( R t linet ateof( ( s, /usr/local/lib/python2.5/email/feedparser.pyt readlineI s c C s( | t j p t ‚ | i i | ƒ d S( N( R t AssertionErrorR R ( R R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyt unreadline[ s c C s’ | i | d } | _ t i | ƒ } | i ƒ | _ g } xC t t | ƒ d ƒ D]+ } | i | | d | | d d ƒ qR W| i | ƒ d S( s$ Push some new data into this object.R i i N( R t NLCRE_crackt splitR t ranget lenR t pushlines( R t datat partst linest i( ( s, /usr/local/lib/python2.5/email/feedparser.pyt push` s )c C s | d d d … | i d *d S( Niÿÿÿÿi ( R ( R R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyR s s c C s | i S( N( R ( R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyt is_closedw s c C s | S( N( ( R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyt __iter__z s c C s' | i ƒ } | d j o t ‚ n | S( NR ( R t StopIteration( R R ( ( s, /usr/local/lib/python2.5/email/feedparser.pyt next} s ( t __name__t __module__t __doc__R R R R R R R"