###################################################################### # README # # lookup.py - by Adam Doppelt - http://www.gurge.com/amd/ # # Based on code and documentation by Scott Leighton, available at: # # http://www.geocities.com/Heartland/Acres/3216/palmrecs.htm # # Since this script is based on his code, permission is granted to # freely distribute it provided that no money changes hands, otherwise # contact Scott at: helphand@pacbell.net # # Note: This code has only been tested with Palm 3.0 for Windows. Use # at your own risk. # # INSTALLATION # # To install, modify the DIR variable to point at your pilot address # directory. # # You will also need python, naturally, and maybe a batch file to # launch lookup.py if you aren't using a decent shell. ###################################################################### import string import struct import sys # This MUST BE CHANGED in order for the script to work. DIR = "d:/Program Files/Palm/AdamP/address/" ####################################################### # utilities ####################################################### def chop(s): return s[0:len(s)-1] ####################################################### # dat file ####################################################### class DATFile: def __init__(self, path): self.file = open(path, "rb") def close(): close(self.file) # read a long def long(self): return struct.unpack('