The token module

This module contains a list of all tokens used by the standard Python tokenizer.

Example: Using the token module
# File: token-example-1.py

import token

print "NUMBER", token.NUMBER
print "PLUS", token.STAR
print "STRING", token.STRING

NUMBER 2
PLUS 16
STRING 3
 

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.02s 2008-08-29 23:33:43.998134. hosted by webfaction.