Popular recipes by Simon Peverett http://code.activestate.com/recipes/users/1410328/2007-03-21T06:35:40-07:00ActiveState Code RecipesByte to Hex and Hex to Byte String Conversion (Python) 2007-03-21T06:35:40-07:00Simon Peveretthttp://code.activestate.com/recipes/users/1410328/http://code.activestate.com/recipes/510399-byte-to-hex-and-hex-to-byte-string-conversion/ <p style="color: grey"> Python recipe 510399 by <a href="/recipes/users/1410328/">Simon Peverett</a> (<a href="/recipes/tags/text/">text</a>). </p> <p>I write a lot of ad-hoc protocol analysers using Python. Generally, I'm dealing with a byte stream that I want to output as a string of hex. Sometimes, I want to convert it back again. Eventually, I got round to putting the functions in a module so I wouldn't keep cut and pasting them :)</p> Simple XOR keyword Encryption (Python) 2004-02-03T03:26:47-08:00Simon Peveretthttp://code.activestate.com/recipes/users/1410328/http://code.activestate.com/recipes/266586-simple-xor-keyword-encryption/ <p style="color: grey"> Python recipe 266586 by <a href="/recipes/users/1410328/">Simon Peverett</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). </p> <p>A very simple keyword encryption algorithm. Produces an encrypted string the same size as the orginal. Not very strong encryption but good enough for lightweight stuff. Works on bytes so could be used for binary streams if converted to and from strings - maybe!</p> Display an Image from a specified file (Python) 2003-10-08T01:54:55-07:00Simon Peveretthttp://code.activestate.com/recipes/users/1410328/http://code.activestate.com/recipes/227575-display-an-image-from-a-specified-file/ <p style="color: grey"> Python recipe 227575 by <a href="/recipes/users/1410328/">Simon Peverett</a> (<a href="/recipes/tags/graphics/">graphics</a>). </p> <p>Reads an image file from the filename specified as the 1st parameter on the command line and displays it on screen. Uses the PIL module so that it can load almost any image file type supported by that module and uses Tkinter to display the image on a Tkinter canvas.</p> <p>I'm new to Python so excuse the clunkyness of implementation.</p>