Package Bio :: Package Nexus :: Module Nexus :: Class CharBuffer
[hide private]
[frames] | no frames]

Class CharBuffer

source code

object --+
         |
        CharBuffer

Helps reading NEXUS-words and characters from a buffer (semi-PRIVATE).

This class is not intended for public use (any more).

Instance Methods [hide private]
 
__init__(self, string)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
peek(self) source code
 
peek_nonwhitespace(self) source code
 
__next__(self)
Iterates over NEXUS characters in the file.
source code
 
next(self)
Deprecated Python 2 style alias for Python 3 style __next__ method.
source code
 
next_nonwhitespace(self)
Checks for next non whitespace character in NEXUS file.
source code
 
skip_whitespace(self)
Skips whitespace characters in NEXUS file.
source code
 
next_until(self, target)
Keeps iterating the NEXUS file until it reaches a target character.
source code
 
peek_word(self, word)
Returns a word stored in the buffer.
source code
 
next_word(self)
Return the next NEXUS word from a string.
source code
 
rest(self)
Return the rest of the string without parsing.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, string)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

next_until(self, target)

source code 

Keeps iterating the NEXUS file until it reaches a target character.

Returns the word found in the NEXUS file.

next_word(self)

source code 

Return the next NEXUS word from a string.

This deals with single and double quotes, whitespace and punctuation.