From my phonecam: Laura Watching Tv

Laura Watching Tv

Laura Watching Tv

#photoblog

From my phonecam: My Office

My Office

My Office

Note: Mac, Linux and W32 boxen

#photoblog

From my phonecam: Erine And Me @ Office

Erine And Me @ Office

Erine And Me @ Office

#photoblog

How to get a CRC32 in Hex in Python

Before I did this:

import zlib

def crc32(filename):
    return "%08x" %  zlib.crc32(file(filename, 'r').read())

But in python2.3 that gives a warning:

FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Python 2.4 and up

So I changed it to:

import zlib, binascii, struct

def crc32(filename):
    bin = struct.pack('!l', zlib.crc32(file(filename, 'r').read()))
    return binascii.hexlify(bin)

I tested these two on a few thousand files and they seem to both have the exact same results.

#python

I wants IT!

The Treo 600 came out this week. I want it even tho it has these draw backs:

  • Internet is not always on - I don’t want silly dialup like support. I want always on broadband. With a static ip. I don’t care if you have to use IPv6 addresses either.

  • While on the internet calls are diverted to voicemail - this is soooo 90’s :)

  • No built in Bluetooth - this is one device that could really use it.

Also it looks like someone lost me $300 by not sending in a rebate from on time. :(