/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/table.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/table.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 994 by bh, Thu May 22 18:05:16 2003 UTC revision 1019 by jan, Fri May 23 12:56:34 2003 UTC
# Line 12  Classes for handling tables of data. Line 12  Classes for handling tables of data.
12    
13  __version__ = "$Revision$"  __version__ = "$Revision$"
14    
15    import os
16  import inspect  import inspect
17  import warnings  import warnings
18    
19    from base import TitledObject
20    
21  import dbflib  import dbflib
22    
23  # the field types supported by a Table instance.  # the field types supported by a Table instance.
# Line 107  class DBFColumn: Line 110  class DBFColumn:
110          self.index = index          self.index = index
111    
112    
113  class DBFTable(OldTableInterfaceMixin):  class DBFTable(TitledObject, OldTableInterfaceMixin):
114    
115      """      """
116      Table interface for the data in a DBF file      Table interface for the data in a DBF file
# Line 129  class DBFTable(OldTableInterfaceMixin): Line 132  class DBFTable(OldTableInterfaceMixin):
132    
133      def __init__(self, filename):      def __init__(self, filename):
134          self.filename = filename          self.filename = filename
135            title = os.path.basename(self.filename)
136            TitledObject.__init__(self, title)
137          self.dbf = dbflib.DBFFile(filename)          self.dbf = dbflib.DBFFile(filename)
138    
139          # If true, self.dbf is open for writing.          # If true, self.dbf is open for writing.
# Line 261  class MemoryColumn: Line 266  class MemoryColumn:
266          self.type = type          self.type = type
267          self.index = index          self.index = index
268    
269  class MemoryTable(OldTableInterfaceMixin):  class MemoryTable(TitledObject, OldTableInterfaceMixin):
270    
271      """Very simple table implementation that operates on a list of tuples"""      """Very simple table implementation that operates on a list of tuples"""
272    
# Line 273  class MemoryTable(OldTableInterfaceMixin Line 278  class MemoryTable(OldTableInterfaceMixin
278          data -- List of tuples, one for each row of data          data -- List of tuples, one for each row of data
279          """          """
280          self.data = data          self.data = data
281            title = 'MemoryTable'
282            TitledObject.__init__(self, title)
283    
284          # Create the column information objects          # Create the column information objects
285          self.columns = []          self.columns = []

Legend:
Removed from v.994  
changed lines
  Added in v.1019

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26