def path(self, name): id = ceil(self.id / 1000.) path = dbs('{0:.0f}'.format(ceil((id) / 100.)), '{0:.0f}'.format(id)) file = os.path.join(path, '{0}_{1}_{2}'.format(self.prefix, self.id, name)) return (( path, file ))
def __init__(self, name): self.name = name self.next = self.counter(1) self.data = self.empty() self.file = dbs('{0}.db'.format(self.name)) self.changesOne = 0 self.changesAll = 0 self.lastSyncTime = time()