Package Bio :: Package NBRF :: Class _Scanner
[hide private]
[frames] | no frames]

Class _Scanner

source code

Start up Martel to do the scanning of the file.

This initialzes the Martel based parser and connects it to a handler that will generate events for a Feature Consumer.

Instance Methods [hide private]
 
__init__(self, debug=0)
Initialize the scanner by setting up our caches.
source code
 
feed(self, handle, consumer)
Feeed a set of data into the scanner.
source code
Method Details [hide private]

__init__(self, debug=0)
(Constructor)

source code 

Initialize the scanner by setting up our caches.

Creating the parser takes a long time, so we want to cache it to reduce parsing time.

Arguments: o debug - The level of debugging that the parser should display. Level 0 is no debugging, Level 2 displays the most debugging info (but is much slower). See Martel documentation for more info on this.

feed(self, handle, consumer)

source code 

Feeed a set of data into the scanner.

Arguments: o handle - A handle with the information to parse. o consumer - The consumer that should be informed of events.