Returns the type of token just read from the specified stream tokenizer object.
Syntax
ttype( streamtokenizer )
streamtokenizer.ttype( )
Parameters
streamtokenizer
|
the stream tokenizer object to use.
|
Returns
integer
|
the type of token read.
TT_WORD
TT_NUMBER
TT_EOL
TT_EOF
|
Example
tt = st.ttype( )
|