JSON Encoding and Decoding with Custom Objects in Python

The JSON module supports encoding (aka serializing) for all the basic built-in python types– strings, lists, dictionaries, tuples, etc. but if you have your own user-defined class that you want to store, I found the documentation to be pretty ambiguous. And since I also didnt see any complete examples out there of custom object [...]

Colourizing Python Print Statements

Lately I find myself writing a lot of python scripts that involves a ton of text flying by, and me inventing increasingly creative combinations of obscure symbols to delineate different portions of the output. Luckily, if you’re not using windows using a sensible operating system, then you probably have an underappreciated tool at your disposal– [...]

Archives

  • January 2010
  • November 2009
  • July 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • Site Feeds

    Posts
    Comments

    Marginal Structure Posts RSS feed

    Site Tags