Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_htmlparser.EventCollectorExtra Class Reference
Inheritance diagram for test.test_htmlparser.EventCollectorExtra:
Inheritance graph
[legend]
Collaboration diagram for test.test_htmlparser.EventCollectorExtra:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def handle_starttag
def get_events
def handle_startendtag
def handle_endtag
def handle_comment
def handle_charref
def handle_data
def handle_decl
def handle_entityref
def handle_pi
def unknown_decl

Public Attributes

 events
 append

Detailed Description

Definition at line 66 of file test_htmlparser.py.


Member Function Documentation

Definition at line 16 of file test_htmlparser.py.

00016 
00017     def get_events(self):
00018         # Normalize the list of events so that buffer artefacts don't
00019         # separate runs of contiguous characters.
00020         L = []
00021         prevtype = None
00022         for event in self.events:
00023             type = event[0]
00024             if type == prevtype == "data":
00025                 L[-1] = ("data", L[-1][1] + event[1])
00026             else:
00027                 L.append(event)
00028             prevtype = type
00029         self.events = L
00030         return L

def test.test_htmlparser.EventCollector.handle_charref (   self,
  data 
) [inherited]

Definition at line 47 of file test_htmlparser.py.

00047 
00048     def handle_charref(self, data):
00049         self.append(("charref", data))

def test.test_htmlparser.EventCollector.handle_comment (   self,
  data 
) [inherited]

Definition at line 44 of file test_htmlparser.py.

00044 
00045     def handle_comment(self, data):
00046         self.append(("comment", data))

def test.test_htmlparser.EventCollector.handle_data (   self,
  data 
) [inherited]

Definition at line 50 of file test_htmlparser.py.

00050 
00051     def handle_data(self, data):
00052         self.append(("data", data))

def test.test_htmlparser.EventCollector.handle_decl (   self,
  data 
) [inherited]

Definition at line 53 of file test_htmlparser.py.

00053 
00054     def handle_decl(self, data):
00055         self.append(("decl", data))

def test.test_htmlparser.EventCollector.handle_endtag (   self,
  tag 
) [inherited]

Definition at line 39 of file test_htmlparser.py.

00039 
00040     def handle_endtag(self, tag):
00041         self.append(("endtag", tag))

def test.test_htmlparser.EventCollector.handle_entityref (   self,
  data 
) [inherited]

Definition at line 56 of file test_htmlparser.py.

00056 
00057     def handle_entityref(self, data):
00058         self.append(("entityref", data))

def test.test_htmlparser.EventCollector.handle_pi (   self,
  data 
) [inherited]

Definition at line 59 of file test_htmlparser.py.

00059 
00060     def handle_pi(self, data):
00061         self.append(("pi", data))

def test.test_htmlparser.EventCollector.handle_startendtag (   self,
  tag,
  attrs 
) [inherited]

Definition at line 36 of file test_htmlparser.py.

00036 
00037     def handle_startendtag(self, tag, attrs):
00038         self.append(("startendtag", tag, attrs))

def test.test_htmlparser.EventCollectorExtra.handle_starttag (   self,
  tag,
  attrs 
)

Reimplemented from test.test_htmlparser.EventCollector.

Definition at line 68 of file test_htmlparser.py.

00068 
00069     def handle_starttag(self, tag, attrs):
00070         EventCollector.handle_starttag(self, tag, attrs)
00071         self.append(("starttag_text", self.get_starttag_text()))
00072 

def test.test_htmlparser.EventCollector.unknown_decl (   self,
  decl 
) [inherited]

Definition at line 62 of file test_htmlparser.py.

00062 
00063     def unknown_decl(self, decl):
00064         self.append(("unknown decl", decl))
00065 


Member Data Documentation

Definition at line 13 of file test_htmlparser.py.

Definition at line 12 of file test_htmlparser.py.


The documentation for this class was generated from the following file: