Profile
Achievement
magicrebirth's Recent SnippetsTagged html
- All /
« Prev 1 Next »
You need to convert Python source code into HTML markup, rendering comments, keywords, operators, and numeric and string literals in different colors.
tokenize.generate_tokens does most of the work. We just need to loop over all tokens it finds, to...
0
1060
posted 13 years ago by magicrebirth
[from the author's website]
I wrote this to better understand the relationship between RGB colors. Running it will generate a fairly large HTML file with all sorts of color transitions on it so you can see what is happening as colors are tweaked in...
0
905
posted 13 years ago by magicrebirth