Ejemplo n.º 1
0
    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
        ))
Ejemplo n.º 2
0
	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()