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)
Initialize the class.
source code
 
peek(self) source code
 
peek_nonwhitespace(self) source code
 
__next__(self)
Iterate over NEXUS characters in the file.
source code
 
next(self)
Return next item, deprecated Python 2 style alias for Python 3 style __next__ method.
source code
 
next_nonwhitespace(self)
Check for next non whitespace character in NEXUS file.
source code
 
skip_whitespace(self)
Skip whitespace characters in NEXUS file.
source code
 
next_until(self, target)
Iterate over the NEXUS file until a target character is reached.
source code
 
peek_word(self, word)
Return 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 
Initialize the class.
Overrides: object.__init__

next_word(self)

source code 

Return the next NEXUS word from a string.

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