Changeset 7854


Ignore:
Timestamp:
Jun 17, 2010, 4:48:21 PM (10 years ago)
Author:
hudson
Message:

Fixed Windows Interpolate nonexistent verbose flag.

Location:
trunk/anuga_core/source/anuga
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/file/csv_file.py

    r7780 r7854  
    1515
    1616
    17 def load_csv_as_dict(file_name, title_check_list=None, delimiter=','):
     17def load_csv_as_dict(file_name, title_check_list=None, delimiter=',',
     18                        d_type = str):
    1819    """
    1920    Load in the csv as a dictionary, title as key and column info as value.
     
    2627
    2728    delimiter is the delimiter used to separate the fields
     29   
     30    format is one of float, str, int
    2831
    2932    return 2 dictionaries: ({key:column}, {title:index}).
     
    3538
    3639    # FIXME(Ole): Consider dealing with files without headers
    37     # FIXME(Ole): Consider a wrapper automatically converting text fields
    38     #             to the right type by trying for: int, float, string
    3940   
    4041    attribute_dic = {}
     
    6768            msg += 'although there were %d headers' % title_count
    6869            raise IOError, msg
    69         for i, value in enumerate(line[:title_count]):  # skip trailing data
    70             attribute_dic.setdefault(titles_stripped[i], []).append(value)
     70        for i, val in enumerate(line[:title_count]):  # skip trailing data
     71            attribute_dic.setdefault(titles_stripped[i], []).append(d_type(val))
    7172
    7273    return attribute_dic, title_index_dic
  • trunk/anuga_core/source/anuga/fit_interpolate/interpolate.py

    r7841 r7854  
    941941                                  ['line', 'point'],
    942942                                  figname='points_boundary',
    943                                   label=title,
    944                                   verbose=verbose)
     943                                  label=title)
    945944
    946945            m = len(self.interpolation_points)
  • trunk/anuga_core/source/anuga/utilities/log.py

    r7848 r7854  
    7474
    7575# set _new_python to True if python version 2.5 or later
    76 _new_python = (sys.version_info >= 0x02050000)      # 2.5.x.x
     76_new_python = (sys.version_info[0]*10 + sys.version_info[1] >= 25)      # 2.5.x.x
    7777
    7878
Note: See TracChangeset for help on using the changeset viewer.