Useful Python snippet #1

Found this useful Python snippet in Python Essential Reference by David M.Beazley today. It seems you can write to files in a similar way to how you would with IOStream in C++ by using the ‘>>’ syntax. Example f = open(‘out.txt’, ‘w’) print >>f, ‘Hello, World’ f.close() Unfortunately this only works in Python 2.x, and will…

New release of hangman.cpp

Four years ago I wrote a script with Brandon Kite to demonstrate vectors (and to make a text based while learning C++). It was released shortly afterwards, just for the hell of it, even though it was certainly nothing special. Anyways, four years later, and it is still online. I just came across it again…

Blog back up (again!)

My site/blog has been down in recent months as my old domain (kahrn.com) expired. I have now moved the blog over to this new domain (rickyhewitt.com). I have also opted to use WordPress as the main platform for my site form now on, dropping my custom scripting and CodeIgniter. I haven’t really had a chance…