Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
All Data Structures Namespaces Files Functions Variables
TestSGMLParser Class Reference
Inheritance diagram for TestSGMLParser:
SGMLParser

Public Member Functions

def __init__
 
def handle_data
 
def flush
 
def handle_comment
 
def unknown_starttag
 
def unknown_endtag
 
def unknown_entityref
 
def unknown_charref
 
def close
 
- Public Member Functions inherited from SGMLParser
def __init__
 
def reset
 
def setnomoretags
 
def setliteral
 
def feed
 
def close
 
def error
 
def goahead
 
def parse_comment
 
def parse_pi
 
def get_starttag_text
 
def parse_starttag
 
def parse_endtag
 
def finish_shorttag
 
def finish_starttag
 
def finish_endtag
 
def handle_starttag
 
def handle_endtag
 
def report_unbalanced
 
def handle_charref
 
def handle_entityref
 
def handle_data
 
def handle_comment
 
def handle_decl
 
def handle_pi
 
def unknown_starttag
 
def unknown_endtag
 
def unknown_charref
 
def unknown_entityref
 

Data Fields

 testdata
 
- Data Fields inherited from SGMLParser
 verbose
 
 rawdata
 
 stack
 
 lasttag
 
 nomoretags
 
 literal
 

Additional Inherited Members

- Static Public Attributes inherited from SGMLParser
 entitydefs = \
 

Detailed Description

Definition at line 428 of file sgmllib.py.

Constructor & Destructor Documentation

def __init__ (   self,
  verbose = 0 
)

Definition at line 430 of file sgmllib.py.

431  def __init__(self, verbose=0):
432  self.testdata = ""
433  SGMLParser.__init__(self, verbose)

Member Function Documentation

def close (   self)

Definition at line 474 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), and TestSGMLParser.flush().

475  def close(self):
476  SGMLParser.close(self)
477  self.flush()
478 
def flush (   self)

Definition at line 439 of file sgmllib.py.

References TestSGMLParser.testdata.

440  def flush(self):
441  data = self.testdata
442  if data:
443  self.testdata = ""
444  print 'data:', `data`
def handle_comment (   self,
  data 
)

Definition at line 445 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), and TestSGMLParser.flush().

446  def handle_comment(self, data):
447  self.flush()
448  r = `data`
449  if len(r) > 68:
450  r = r[:32] + '...' + r[-32:]
451  print 'comment:', r
def handle_data (   self,
  data 
)

Definition at line 434 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), TestSGMLParser.flush(), and TestSGMLParser.testdata.

435  def handle_data(self, data):
436  self.testdata = self.testdata + data
437  if len(`self.testdata`) >= 70:
438  self.flush()
def unknown_charref (   self,
  ref 
)

Definition at line 470 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), and TestSGMLParser.flush().

471  def unknown_charref(self, ref):
472  self.flush()
473  print '*** unknown char ref: &#' + ref + ';'
def unknown_endtag (   self,
  tag 
)

Definition at line 462 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), and TestSGMLParser.flush().

463  def unknown_endtag(self, tag):
464  self.flush()
465  print 'end tag: </' + tag + '>'
def unknown_entityref (   self,
  ref 
)

Definition at line 466 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), and TestSGMLParser.flush().

467  def unknown_entityref(self, ref):
468  self.flush()
469  print '*** unknown entity ref: &' + ref + ';'
def unknown_starttag (   self,
  tag,
  attrs 
)

Definition at line 452 of file sgmllib.py.

References GzipFile.flush(), NullWriter.flush(), _SpoofOut.flush(), and TestSGMLParser.flush().

453  def unknown_starttag(self, tag, attrs):
454  self.flush()
455  if not attrs:
456  print 'start tag: <' + tag + '>'
457  else:
458  print 'start tag: <' + tag,
459  for name, value in attrs:
460  print name + '=' + '"' + value + '"',
461  print '>'

Field Documentation

testdata

Definition at line 431 of file sgmllib.py.


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