(self, entitydefs=None, encoding=DEFAULT_ENCODING)
| 476 | """forms attribute contains HTMLForm instances on completion.""" |
| 477 | # thanks to Moshe Zadka for an example of sgmllib/htmllib usage |
| 478 | def __init__(self, entitydefs=None, encoding=DEFAULT_ENCODING): |
| 479 | if entitydefs is None: |
| 480 | entitydefs = get_entitydefs() |
| 481 | self._entitydefs = entitydefs |
| 482 | self._encoding = encoding |
| 483 | |
| 484 | self.base = None |
| 485 | self.forms = [] |
| 486 | self.labels = [] |
| 487 | self._current_label = None |
| 488 | self._current_form = None |
| 489 | self._select = None |
| 490 | self._optgroup = None |
| 491 | self._option = None |
| 492 | self._textarea = None |
| 493 | |
| 494 | # forms[0] will contain all controls that are outside of any form |
| 495 | # self._global_form is an alias for self.forms[0] |
| 496 | self._global_form = None |
| 497 | self.start_form([]) |
| 498 | self.end_form() |
| 499 | self._current_form = self._global_form = self.forms[0] |
| 500 | |
| 501 | def do_base(self, attrs): |
| 502 | debug("%s", attrs) |
nothing calls this directly
no test coverage detected