import config import spam import title from node import * from tag import * from tiedobj import * try: import PIL.Image except ImportError: PIL = None sys.stdout.write('system does not have PIL.\n') __all__ = ['Record', 'Cache', 'CacheList', 'UpdateList', 'RecentList'] lock = RLock() def fsdiff(f, s): '''Diff between file and string. Return same data or not. ''' try: if os.path.isfile(f): buf = file(f, 'rb').read() else: buf = '' except (IOError, OSError), e: sys.stderr.write('%s: %s\n' % (f, e)) buf = ''
def __init__(self): self.counter = 0 self.lock = RLock()