You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(6) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: alexander s. <a1...@us...> - 2012-12-17 19:16:59
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15341 Modified Files: dbf.py Log Message: support slicing Index: dbf.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/dbf.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dbf.py 14 Dec 2010 11:10:17 -0000 1.8 --- dbf.py 17 Dec 2012 19:16:57 -0000 1.9 *************** *** 39,42 **** --- 39,43 ---- """ """History (most recent first): + 17-dec-2012 [als] support slicing 14-dec-2010 [als] added Memo file support 11-feb-2007 [als] export INVALID_VALUE; *************** *** 256,259 **** --- 257,262 ---- def __getitem__(self, index): """Return `DbfRecord` instance.""" + if isinstance(index, slice): + return [self[_recno] for _recno in range(self.recordCount)[index]] return self.RecordClass.fromStream(self, self._fixIndex(index)) |
From: alexander s. <a1...@us...> - 2010-12-15 08:08:31
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv26110 Modified Files: memo.py Log Message: remove debug print Index: memo.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/memo.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memo.py 14 Dec 2010 11:00:21 -0000 1.2 --- memo.py 15 Dec 2010 08:08:23 -0000 1.3 *************** *** 130,134 **** """ - print ("SEEK", self.blocksize, blocknum) self.stream.seek(self.blocksize * blocknum) if self.is_fpt: --- 130,133 ---- |
From: alexander s. <a1...@us...> - 2010-12-14 11:10:25
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv18204 Modified Files: dbf.py Log Message: added Memo file support Index: dbf.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/dbf.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dbf.py 11 Feb 2007 09:23:13 -0000 1.7 --- dbf.py 14 Dec 2010 11:10:17 -0000 1.8 *************** *** 39,42 **** --- 39,43 ---- """ """History (most recent first): + 14-dec-2010 [als] added Memo file support 11-feb-2007 [als] export INVALID_VALUE; Dbf: added .ignoreErrors, .INVALID_VALUE *************** *** 64,67 **** --- 65,69 ---- import header + import memo import record from utils import INVALID_VALUE *************** *** 82,86 **** """ ! __slots__ = ("name", "header", "stream", "_changed", "_new", "_ignore_errors") --- 84,88 ---- """ ! __slots__ = ("name", "header", "stream", "memo", "_changed", "_new", "_ignore_errors") *************** *** 91,95 **** ## initialization and creation helpers ! def __init__(self, f, readOnly=False, new=False, ignoreErrors=False): """Initialize instance. --- 93,98 ---- ## initialization and creation helpers ! def __init__(self, f, readOnly=False, new=False, ignoreErrors=False, ! memoFile=None): """Initialize instance. *************** *** 97,103 **** f: Filename or file-like object. - new: - True if new data table must be created. Assume - data table exists if this argument is False. readOnly: if ``f`` argument is a string file will --- 100,103 ---- *************** *** 105,115 **** this argument is ignored. This argument is ignored even if ``new`` argument is True. ! headerObj: ! `header.DbfHeader` instance or None. If this argument ! is None, new empty header will be used with the ! all fields set by default. ignoreErrors: if set, failing field value conversion will return ``INVALID_VALUE`` instead of raising conversion error. """ --- 105,117 ---- this argument is ignored. This argument is ignored even if ``new`` argument is True. ! new: ! True if new data table must be created. Assume ! data table exists if this argument is False. ignoreErrors: if set, failing field value conversion will return ``INVALID_VALUE`` instead of raising conversion error. + memoFile: + optional path to the FPT (memo fields) file. + Default is generated from the DBF file name. """ *************** *** 122,126 **** self.stream = file(f, "w+b") else: ! # tabe file must exist self.stream = file(f, ("r+b", "rb")[bool(readOnly)]) else: --- 124,128 ---- self.stream = file(f, "w+b") else: ! # table file must exist self.stream = file(f, ("r+b", "rb")[bool(readOnly)]) else: *************** *** 137,140 **** --- 139,150 ---- self._new = bool(new) self._changed = False + if memoFile: + self.memo = memo.MemoFile(memoFile, readOnly=readOnly, new=new) + elif self.header.hasMemoField: + self.memo = memo.MemoFile(memo.MemoFile.memoFileName(self.name), + readOnly=readOnly, new=new) + else: + self.memo = None + self.header.setMemoFile(self.memo) ## properties *************** *** 198,201 **** --- 208,212 ---- self.header.write(self.stream) self.stream.flush() + self.memo.flush() self._changed = False *************** *** 225,228 **** --- 236,244 ---- if self._new: self.header.addField(*defs) + if self.header.hasMemoField: + if not self.memo: + self.memo = memo.MemoFile( + memo.MemoFile.memoFileName(self.name), new=True) + self.header.setMemoFile(self.memo) else: raise TypeError("At least one record was added, " |
From: alexander s. <a1...@us...> - 2010-12-14 11:07:55
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv17227 Modified Files: header.py Log Message: added Memo file support Index: header.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/header.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** header.py 16 Sep 2010 05:06:39 -0000 1.6 --- header.py 14 Dec 2010 11:07:45 -0000 1.7 *************** *** 7,10 **** --- 7,11 ---- """ """History (most recent first): + 14-dec-2010 [als] added Memo file support 16-sep-2010 [als] fromStream: fix century of the last update field 11-feb-2007 [als] added .ignoreErrors *************** *** 138,141 **** --- 139,150 ---- day = property(lambda self: self.lastUpdate.day) + @property + def hasMemoField(self): + """True if at least one field is a Memo field""" + for _field in self.fields: + if _field.isMemo: + return True + return False + def ignoreErrors(self, value): """Update `ignoreErrors` flag on self and all fields""" *************** *** 187,191 **** # wanna add any of the definitions -- all will be ignored) _defs = [] ! _recordLength = 0 for _def in defs: if isinstance(_def, fields.DbfFieldDef): --- 196,200 ---- # wanna add any of the definitions -- all will be ignored) _defs = [] ! _recordLength = self.recordLength for _def in defs: if isinstance(_def, fields.DbfFieldDef): *************** *** 194,198 **** (_name, _type, _len, _dec) = (tuple(_def) + (None,) * 4)[:4] _cls = fields.lookupFor(_type) ! _obj = _cls(_name, _len, _dec, ignoreErrors=self._ignore_errors) _recordLength += _obj.length --- 203,207 ---- (_name, _type, _len, _dec) = (tuple(_def) + (None,) * 4)[:4] _cls = fields.lookupFor(_type) ! _obj = _cls(_name, _len, _dec, _recordLength, ignoreErrors=self._ignore_errors) _recordLength += _obj.length *************** *** 201,208 **** # update record length self.fields += _defs ! return _recordLength ## interface methods def addField(self, *defs): """Add field definition to the header. --- 210,247 ---- # update record length self.fields += _defs ! return (_recordLength - self.recordLength) ! ! def _calcHeaderLength(self): ! """Update self.headerLength attribute after change to header contents ! """ ! # recalculate headerLength ! self.headerLength = 32 + (32 * len(self.fields)) + 1 ! if self.signature == 0x30: ! # Visual FoxPro files have 263-byte zero-filled field for backlink ! self.headerLength += 263 ## interface methods + def setMemoFile(self, memo): + """Attach MemoFile instance to all memo fields; check header signature + """ + _has_memo = False + for _field in self.fields: + if _field.isMemo: + _field.file = memo + _has_memo = True + # for signatures list, see + # http://www.clicketyclick.dk/databases/xbase/format/dbf.html#DBF_NOTE_1_TARGET + # http://www.dbf2002.com/dbf-file-format.html + # If memo is attached, will use 0x30 for Visual FoxPro file, + # 0x83 for dBASE III+. + if _has_memo \ + and (self.signature not in (0x30, 0x83, 0x8B, 0xCB, 0xE5, 0xF5)): + if memo.is_fpt: + self.signature = 0x30 + else: + self.signature = 0x83 + self._calcHeaderLength() + def addField(self, *defs): """Add field definition to the header. *************** *** 219,230 **** """ ! _oldLen = self.recordLength self.recordLength += self._addField(*defs) ! if not _oldLen: ! self.recordLength += 1 ! # XXX: may be just use: ! # self.recordeLength += self._addField(*defs) + bool(not _oldLen) ! # recalculate headerLength ! self.headerLength = 32 + (32 * len(self.fields)) + 1 self.changed = True --- 258,265 ---- """ ! if not self.recordLength: ! self.recordLength = 1 self.recordLength += self._addField(*defs) ! self._calcHeaderLength() self.changed = True *************** *** 235,242 **** --- 270,286 ---- stream.write("".join([_fld.toString() for _fld in self.fields])) stream.write(chr(0x0D)) # cr at end of all hdr data + _pos = stream.tell() + if _pos < self.headerLength: + stream.write("\0" * (self.headerLength - _pos)) self.changed = False def toString(self): """Returned 32 chars length string with encoded header.""" + # FIXME: should keep flag and code page marks read from file + if self.hasMemoField: + _flag = "\x02" + else: + _flag = "\0" + _codepage = "\0" return struct.pack("<4BI2H", self.signature, *************** *** 246,250 **** self.recordCount, self.headerLength, ! self.recordLength) + "\0" * 20 def setCurrentDate(self): --- 290,294 ---- self.recordCount, self.headerLength, ! self.recordLength) + "\0" * 16 + _flag + _codepage + "\0\0" def setCurrentDate(self): |
From: alexander s. <a1...@us...> - 2010-12-14 11:04:57
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv16216 Modified Files: fields.py Log Message: support reading and writing Memo fields; .toString: write field offset Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** fields.py 26 May 2009 05:16:51 -0000 1.14 --- fields.py 14 Dec 2010 11:04:49 -0000 1.15 *************** *** 5,8 **** --- 5,10 ---- """ """History (most recent first): + 14-dec-2010 [als] support reading and writing Memo fields; + .toString: write field offset 26-may-2009 [als] DbfNumericFieldDef.decodeValue: strip zero bytes 05-feb-2009 [als] DbfDateFieldDef.encodeValue: empty arg produces empty date *************** *** 35,38 **** --- 37,41 ---- import sys + from memo import MemoData import utils *************** *** 73,76 **** --- 76,82 ---- defaultValue = None + # True if field data is kept in the Memo file + isMemo = property(lambda self: self.typeCode in "GMP") + def __init__(self, name, length=None, decimalCount=None, start=None, stop=None, ignoreErrors=False, *************** *** 145,150 **** _name + self.typeCode + ! #data address ! chr(0) * 4 + chr(self.length) + chr(self.decimalCount) + --- 151,155 ---- _name + self.typeCode + ! struct.pack("<L", self.start) + chr(self.length) + chr(self.decimalCount) + *************** *** 327,344 **** class DbfMemoFieldDef(DbfFieldDef): ! """Definition of the memo field. ! ! Note: memos aren't currenly completely supported. ! ! """ typeCode = "M" ! defaultValue = " " * 10 ! length = 10 def decodeValue(self, value): ! """Return int .dbt block number decoded from the string object.""" ! #return int(value) ! raise NotImplementedError def encodeValue(self, value): --- 332,352 ---- class DbfMemoFieldDef(DbfFieldDef): ! """Definition of the memo field.""" typeCode = "M" ! defaultValue = "\0" * 4 ! length = 4 ! # MemoFile instance. Must be set before reading or writing to the field. ! file = None ! # MemoData type for strings written to the memo file ! memoType = MemoData.TYPE_MEMO def decodeValue(self, value): ! """Return MemoData instance containing field data.""" ! _block = struct.unpack("<L", value)[0] ! if _block: ! return self.file.read(_block) ! else: ! return MemoData("", self.memoType) def encodeValue(self, value): *************** *** 348,353 **** """ ! #return str(value)[:self.length].ljust(self.length) ! raise NotImplementedError --- 356,371 ---- """ ! if value: ! return struct.pack("<L", ! self.file.write(MemoData(value, self.memoType))) ! else: ! return self.defaultValue ! ! ! class DbfGeneralFieldDef(DbfFieldDef): ! """Definition of the general (OLE object) field.""" ! ! typeCode = "G" ! memoType = MemoData.TYPE_OBJECT |
From: alexander s. <a1...@us...> - 2010-12-14 11:00:29
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv15461 Modified Files: memo.py Log Message: debug Index: memo.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/memo.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** memo.py 13 Dec 2010 08:48:21 -0000 1.1 --- memo.py 14 Dec 2010 11:00:21 -0000 1.2 *************** *** 1,10 **** """Memo file support. - Note: current implementation works with FPT files. - DBT files (dBASE III+) have version number (03h) - in the 16th (zero-based) byte of the header - and do not have value type/length at start - of data blocks. - """ """History (most recent first): --- 1,4 ---- *************** *** 19,22 **** --- 13,17 ---- import os + import struct class MemoData(str): *************** *** 36,39 **** --- 31,39 ---- type = TYPE_MEMO + def __new__(cls, value, type=TYPE_MEMO): + _obj = super(MemoData, cls).__new__(cls, value) + _obj.type = type + return _obj + class MemoFile(object): *************** *** 67,71 **** """ ! self.isFpt = fpt if isinstance(f, basestring): # a filename --- 67,71 ---- """ ! self.is_fpt = fpt if isinstance(f, basestring): # a filename *************** *** 81,101 **** self.stream.seek(0) if new: ! self.tail = 1 ! if self.isFpt: ! self.blocksize = blocksize ! else: self.blocksize = 512 self.stream.write( ! struct.pack(">LH>H", self.tail, 0, self.blocksize) + "\0" * 8 + "\x03" + "\0" * 495) else: ! (self.tail, _zero, self.blocksize) = struct.unpack(">LH>H", self.stream.read(8)) ! if not self.isFpt: # In DBT files, block size is fixed to 512 bytes self.blocksize = 512 @staticmethod ! def fptFileName(name, isFpt=True): """Return Memo file name for given DBF file name --- 81,106 ---- self.stream.seek(0) if new: ! if not self.is_fpt: self.blocksize = 512 + # http://msdn.microsoft.com/en-US/library/d6e1ah7y%28v=VS.80%29.aspx + elif blocksize == 0: + self.blocksize = 1 + elif blocksize <= 32: + self.blocksize = 512 * blocksize + else: + self.blocksize = blocksize + self.tail = 512 / self.blocksize self.stream.write( ! struct.pack(">LHH", self.tail, 0, self.blocksize) + "\0" * 8 + "\x03" + "\0" * 495) else: ! (self.tail, _zero, self.blocksize) = struct.unpack(">LHH", self.stream.read(8)) ! if not self.is_fpt: # In DBT files, block size is fixed to 512 bytes self.blocksize = 512 @staticmethod ! def memoFileName(name, isFpt=True): """Return Memo file name for given DBF file name *************** *** 125,131 **** """ self.stream.seek(self.blocksize * blocknum) ! if self.isFpt: ! (_type, _len) = struct.unpack(">L>L", self.stream.read(8)) if _type == MemoData.TYPE_NULL: _value = '' --- 130,137 ---- """ + print ("SEEK", self.blocksize, blocknum) self.stream.seek(self.blocksize * blocknum) ! if self.is_fpt: ! (_type, _len) = struct.unpack(">LL", self.stream.read(8)) if _type == MemoData.TYPE_NULL: _value = '' *************** *** 139,143 **** _value += self.stream.read(self.blocksize) _value = _value[:_value.find(self.EOT)] ! return (_value, _type) def write(self, value): --- 145,149 ---- _value += self.stream.read(self.blocksize) _value = _value[:_value.find(self.EOT)] ! return MemoData(_value, _type) def write(self, value): *************** *** 150,163 **** _rv = self.tail self.stream.seek(self.blocksize * _rv) ! _length = len(value) + 2 ! if self.isFpt: ! _length += 8 _type = getattr(value, "type", MemoData.TYPE_MEMO) ! self.stream.write(struct.pack(">L>L", _type, len(value)) ! + value + self.EOT) else: self.stream.write(value + self.EOT) ! self.tail += ceil(float(_length) / self.blocksize) return _rv # vim: et sts=4 sw=4 : --- 156,177 ---- _rv = self.tail self.stream.seek(self.blocksize * _rv) ! if self.is_fpt: ! _length = len(value) + 8 _type = getattr(value, "type", MemoData.TYPE_MEMO) ! self.stream.write(struct.pack(">LL", _type, len(value)) + value) else: + _length = len(value) + 2 self.stream.write(value + self.EOT) ! #_cnt = int(math.ceil(float(_length) / self.blocksize)) ! _cnt = (_length + self.blocksize - 1) / self.blocksize ! self.stream.write("\0" * (_cnt * self.blocksize - _length)) ! self.tail += _cnt ! self.stream.seek(0) ! self.stream.write(struct.pack(">L", self.tail)) return _rv + def flush(self): + """Flush data to the associated stream.""" + self.stream.flush() + # vim: et sts=4 sw=4 : |
From: alexander s. <a1...@us...> - 2010-12-13 08:48:30
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv8179 Added Files: memo.py Log Message: Memo file support --- NEW FILE: memo.py --- """Memo file support. Note: current implementation works with FPT files. DBT files (dBASE III+) have version number (03h) in the 16th (zero-based) byte of the header and do not have value type/length at start of data blocks. """ """History (most recent first): 13-dec-2010 [als] created """ __version__ = "$Revision: 1.1 $"[11:-2] __date__ = "$Date: 2010/12/13 08:48:21 $"[7:-2] # Note: the data class is exported for TYPE constants. __all__ = ["MemoFile", "MemoData"] import os class MemoData(str): """Data read from or written to Memo file. This is 8-bit string data with additional attribute type which can accept values of the TYPE_* constants. """ TYPE_PICTURE = 0 TYPE_MEMO = 1 TYPE_OBJECT = 2 TYPE_NULL = 160 type = TYPE_MEMO class MemoFile(object): """Memo file object""" __slots__ = ("name", "stream", "is_fpt", "blocksize", "tail") # End Of Text EOT = "\x1A\x1A" def __init__(self, f, blocksize=512, fpt=True, readOnly=False, new=False, ): """Initialize instance. Arguments: f: Filename or file-like object. blocksize: Size of blocks in the Memo file. Used for new files only; ignored if file already exists. fpt: True if file format is FoxPro Memo file (file blocks start with type and length fields). readOnly: If True, open existing files read-only. Ignored if ``f`` is a file object of if ``new`` is True. new: True to create new memo file, False to open existing file. """ self.isFpt = fpt if isinstance(f, basestring): # a filename self.name = f if new: self.stream = file(f, "w+b") else: self.stream = file(f, ("r+b", "rb")[bool(readOnly)]) else: # a stream self.name = getattr(f, "name", "") self.stream = f self.stream.seek(0) if new: self.tail = 1 if self.isFpt: self.blocksize = blocksize else: self.blocksize = 512 self.stream.write( struct.pack(">LH>H", self.tail, 0, self.blocksize) + "\0" * 8 + "\x03" + "\0" * 495) else: (self.tail, _zero, self.blocksize) = struct.unpack(">LH>H", self.stream.read(8)) if not self.isFpt: # In DBT files, block size is fixed to 512 bytes self.blocksize = 512 @staticmethod def fptFileName(name, isFpt=True): """Return Memo file name for given DBF file name Arguments: name: Name of DBF file. FoxPro file extensions like SCX or DBC are supported. isFpt: True if file is FoxPro Memo file. If isFpt is False, DBF memos have extension DBT instead of FPT. """ (_basename, _ext) = os.path.splitext(name) if _ext.upper() in ("", ".DBF"): if isFpt: return _basename + ".FPT" else: return _basename + ".DBT" else: return name[:-1] + "T" def read(self, blocknum): """Read the block addressed by blocknum Return a MemoData object. """ self.stream.seek(self.blocksize * blocknum) if self.isFpt: (_type, _len) = struct.unpack(">L>L", self.stream.read(8)) if _type == MemoData.TYPE_NULL: _value = '' else: _value = self.stream.read(_len) else: # DBT _type = MemoData.TYPE_MEMO self.stream.seek(self.blocksize * blocknum) _value = '' while self.EOT not in _value: _value += self.stream.read(self.blocksize) _value = _value[:_value.find(self.EOT)] return (_value, _type) def write(self, value): """Write a value to FPT file, return starting block number The value argument may be simple string or a MemoData object. In the former case value type is assumed to be TYPE_MEMO. """ _rv = self.tail self.stream.seek(self.blocksize * _rv) _length = len(value) + 2 if self.isFpt: _length += 8 _type = getattr(value, "type", MemoData.TYPE_MEMO) self.stream.write(struct.pack(">L>L", _type, len(value)) + value + self.EOT) else: self.stream.write(value + self.EOT) self.tail += ceil(float(_length) / self.blocksize) return _rv # vim: et sts=4 sw=4 : |
From: alexander s. <a1...@us...> - 2010-09-16 05:16:14
|
Update of /cvsroot/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv7848 Modified Files: CHANGES setup.py Log Message: release version 2.2.5 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** setup.py 26 May 2009 05:22:14 -0000 1.15 --- setup.py 16 Sep 2010 05:16:06 -0000 1.16 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.2.4", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.2.5", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CHANGES 26 May 2009 05:21:34 -0000 1.16 --- CHANGES 16 Sep 2010 05:16:06 -0000 1.17 *************** *** 1,2 **** --- 1,7 ---- + Version 2.2.5 (16-sep-2010) + --------------------------- + + Fix Y2K issue with Last Update field in the header (sf bug 3065838). + Version 2.2.4 (26-may-2009) --------------------------- |
From: alexander s. <a1...@us...> - 2010-09-16 05:06:48
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv7138 Modified Files: header.py Log Message: fromStream: fix century of the last update field Index: header.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/header.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** header.py 11 Feb 2007 09:21:28 -0000 1.5 --- header.py 16 Sep 2010 05:06:39 -0000 1.6 *************** *** 7,10 **** --- 7,11 ---- """ """History (most recent first): + 16-sep-2010 [als] fromStream: fix century of the last update field 11-feb-2007 [als] added .ignoreErrors 10-feb-2007 [als] added __getitem__: return field definitions *************** *** 108,114 **** (_cnt, _hdrLen, _recLen) = struct.unpack("<I2H", _data[4:12]) #reserved = _data[12:32] ## create header object _obj = cls(None, _hdrLen, _recLen, _cnt, ord(_data[0]), ! (1900 + ord(_data[1]), ord(_data[2]), ord(_data[3]))) ## append field definitions # position 0 is for the deletion flag --- 109,122 ---- (_cnt, _hdrLen, _recLen) = struct.unpack("<I2H", _data[4:12]) #reserved = _data[12:32] + _year = ord(_data[1]) + if _year < 80: + # dBase II started at 1980. It is quite unlikely + # that actual last update date is before that year. + _year += 2000 + else: + _year += 1900 ## create header object _obj = cls(None, _hdrLen, _recLen, _cnt, ord(_data[0]), ! (_year, ord(_data[2]), ord(_data[3]))) ## append field definitions # position 0 is for the deletion flag |
From: alexander s. <a1...@us...> - 2009-05-26 05:22:48
|
Update of /cvsroot/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7559 Modified Files: setup.py Log Message: version 2.2.4 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** setup.py 17 Feb 2009 05:58:28 -0000 1.14 --- setup.py 26 May 2009 05:22:14 -0000 1.15 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.2.3", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.2.4", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", |
From: alexander s. <a1...@us...> - 2009-05-26 05:21:43
|
Update of /cvsroot/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7357 Modified Files: CHANGES Log Message: release version 2.2.4 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CHANGES 17 Feb 2009 05:57:45 -0000 1.15 --- CHANGES 26 May 2009 05:21:34 -0000 1.16 *************** *** 1,2 **** --- 1,7 ---- + Version 2.2.4 (26-may-2009) + --------------------------- + + Ignore leading and trailing zero bytes in numeric fields. + Version 2.2.3 (17-feb-2009) --------------------------- |
From: alexander s. <a1...@us...> - 2009-05-26 05:16:58
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5764 Modified Files: fields.py Log Message: DbfNumericFieldDef.decodeValue: strip zero bytes Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fields.py 5 Feb 2009 05:31:57 -0000 1.13 --- fields.py 26 May 2009 05:16:51 -0000 1.14 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 26-may-2009 [als] DbfNumericFieldDef.decodeValue: strip zero bytes 05-feb-2009 [als] DbfDateFieldDef.encodeValue: empty arg produces empty date 16-sep-2008 [als] DbfNumericFieldDef decoding looks for decimal point *************** *** 235,243 **** """ ! value = value.strip() if "." in value: # a float (has decimal separator) return float(value) ! elif value and value.strip(): # must be an integer return int(value) --- 236,244 ---- """ ! value = value.strip(" \0") if "." in value: # a float (has decimal separator) return float(value) ! elif value: # must be an integer return int(value) |
From: alexander s. <a1...@us...> - 2009-03-11 07:52:58
|
Update of /cvsroot/dbfpy/htdocs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25095 Removed Files: python-powered-w-100x40.png python-powered-w-125x40.png PythonPowered.gif Log Message: obsolete with python-powered-w-120x40.png --- python-powered-w-100x40.png DELETED --- --- python-powered-w-125x40.png DELETED --- --- PythonPowered.gif DELETED --- |
From: alexander s. <a1...@us...> - 2009-03-11 07:52:30
|
Update of /cvsroot/dbfpy/htdocs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24959 Removed Files: header.inc index.php Log Message: remove php version - use shtml instead --- header.inc DELETED --- --- index.php DELETED --- |
From: alexander s. <a1...@us...> - 2009-03-11 07:51:57
|
Update of /cvsroot/dbfpy/htdocs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24817 Modified Files: header.shtml Log Message: update for new sf.net logo Index: header.shtml =================================================================== RCS file: /cvsroot/dbfpy/htdocs/header.shtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** header.shtml 25 Feb 2007 05:29:12 -0000 1.1.1.1 --- header.shtml 11 Mar 2009 07:51:54 -0000 1.2 *************** *** 23,33 **** </div> <div class="logos"> ! <a href="http://www.python.org/"><img src="python-powered-w-125x40.png" ! width="125" height="40" alt="[Python Powered]" /></a> <br /> ! <a href="http://sourceforge.net"><img ! src="http://sflogo.sourceforge.net/sflogo.php?group_id=5811&type=2" ! width="125" height="37" alt="SourceForge.net Logo" /></a> </div> --- 23,34 ---- </div> <div class="logos"> ! <a href="http://www.python.org/"><img src="python-powered-w-120x40.png" ! width="120" height="40" alt="[Python Powered]" /></a> <br /> ! <a href="http://sourceforge.net/projects/dbfpy"><img ! src="http://sflogo.sourceforge.net/sflogo.php?group_id=140566&type=12" ! width="120" height="30" border="0" ! alt="Get dbfpy at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> </div> |
From: alexander s. <a1...@us...> - 2009-03-11 07:51:31
|
Update of /cvsroot/dbfpy/htdocs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24615 Added Files: python-powered-w-120x40.png Log Message: "Python Powered" logo padded with transparency to match the width of sf.net logo --- NEW FILE: python-powered-w-120x40.png --- (This appears to be a binary file; contents omitted.) |
From: alexander s. <a1...@us...> - 2009-02-17 05:58:33
|
Update of /cvsroot/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1231 Modified Files: setup.py Log Message: version 2.2.3 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** setup.py 16 Sep 2008 06:38:58 -0000 1.13 --- setup.py 17 Feb 2009 05:58:28 -0000 1.14 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.2.2", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.2.3", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", |
From: alexander s. <a1...@us...> - 2009-02-17 05:57:53
|
Update of /cvsroot/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1036 Modified Files: CHANGES Log Message: release version 2.2.3 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CHANGES 16 Sep 2008 06:39:59 -0000 1.14 --- CHANGES 17 Feb 2009 05:57:45 -0000 1.15 *************** *** 1,2 **** --- 1,7 ---- + Version 2.2.3 (17-feb-2009) + --------------------------- + + Support for writing empty date values. + Version 2.2.2 (16-sep-2008) --------------------------- |
From: alexander s. <a1...@us...> - 2009-02-05 05:32:04
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4508 Modified Files: fields.py Log Message: DbfDateFieldDef.encodeValue: empty arg (None, empty string etc.) produces empty date value Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** fields.py 16 Sep 2008 06:04:19 -0000 1.12 --- fields.py 5 Feb 2009 05:31:57 -0000 1.13 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 05-feb-2009 [als] DbfDateFieldDef.encodeValue: empty arg produces empty date 16-sep-2008 [als] DbfNumericFieldDef decoding looks for decimal point in the value to select float or integer return type *************** *** 375,379 **** """ ! return utils.getDate(value).strftime("%Y%m%d") --- 376,383 ---- """ ! if value: ! return utils.getDate(value).strftime("%Y%m%d") ! else: ! return " " * self.length |
From: alexander s. <a1...@us...> - 2008-09-15 23:40:03
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv6317 Modified Files: CHANGES Log Message: release version 2.2.2 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CHANGES 16 Mar 2008 08:46:08 -0000 1.13 --- CHANGES 16 Sep 2008 06:39:59 -0000 1.14 *************** *** 1,2 **** --- 1,8 ---- + Version 2.2.2 (16-sep-2008) + --------------------------- + + Numeric decoder returns float when the value contains decimal point + without regard to the number of decimal places declared in the header. + Version 2.2.1 (16-mar-2008) --------------------------- |
From: alexander s. <a1...@us...> - 2008-09-15 23:39:02
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv5935 Modified Files: setup.py Log Message: version 2.2.2 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** setup.py 16 Mar 2008 08:45:21 -0000 1.12 --- setup.py 16 Sep 2008 06:38:58 -0000 1.13 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.2.1", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.2.2", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", |
From: alexander s. <a1...@us...> - 2008-09-15 23:04:24
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv25748 Modified Files: fields.py Log Message: DbfNumericFieldDef decoding looks for decimal point in the value to select float or integer return type Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** fields.py 13 Mar 2008 06:09:52 -0000 1.11 --- fields.py 16 Sep 2008 06:04:19 -0000 1.12 *************** *** 5,8 **** --- 5,10 ---- """ """History (most recent first): + 16-sep-2008 [als] DbfNumericFieldDef decoding looks for decimal point + in the value to select float or integer return type 13-mar-2008 [als] check field name length in constructor 11-feb-2007 [als] handle value conversion errors *************** *** 233,245 **** """ value = value.strip() ! if self.decimalCount > 0: ! # a float (has decimal digits) ! if value: ! return float(value) ! return 0.0 else: - # an integer - if value: - return int(value) return 0 --- 235,245 ---- """ value = value.strip() ! if "." in value: ! # a float (has decimal separator) ! return float(value) ! elif value and value.strip(): ! # must be an integer ! return int(value) else: return 0 |
From: alexander s. <a1...@us...> - 2008-03-16 08:46:13
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv22582 Modified Files: CHANGES Log Message: release version 2.2.1 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CHANGES 11 Feb 2007 09:39:07 -0000 1.12 --- CHANGES 16 Mar 2008 08:46:08 -0000 1.13 *************** *** 1,2 **** --- 1,8 ---- + Version 2.2.1 (16-mar-2008) + --------------------------- + + Fix: raise ValueError if a name passed to field constructor + is longer than 10 characters. + Version 2.2.0 (11-feb-2007) --------------------------- |
From: alexander s. <a1...@us...> - 2008-03-16 08:45:28
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv22211 Modified Files: setup.py Log Message: version 2.2.1 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** setup.py 11 Feb 2007 10:09:13 -0000 1.11 --- setup.py 16 Mar 2008 08:45:21 -0000 1.12 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.2.0", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.2.1", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", |
From: alexander s. <a1...@us...> - 2008-03-13 06:10:00
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv10515 Modified Files: fields.py Log Message: check field name length in constructor Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** fields.py 11 Feb 2007 09:08:11 -0000 1.10 --- fields.py 13 Mar 2008 06:09:52 -0000 1.11 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 13-mar-2008 [als] check field name length in constructor 11-feb-2007 [als] handle value conversion errors 10-feb-2007 [als] DbfFieldDef: added .rawFromRecord() *************** *** 75,78 **** --- 76,81 ---- assert self.defaultValue is not None, "Default value must be overriden" ## fix arguments + if len(name) >10: + raise ValueError("Field name \"%s\" is too long" % name) name = str(name).upper() if self.__class__.length is None: |