Changeset 3630
- Timestamp:
- 17/03/08 15:14:19 (13 years ago)
- Location:
- nappy/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
nappy/trunk/nappy.ini
r3527 r3630 2 2 version = 0.3.0 3 3 DEBUG = False 4 default_delimiter = __space____space____space____space__ 5 default_float_format = %g 4 6 annotations_file = annotations.ini 5 7 -
nappy/trunk/nappy/nappy_api.py
r3628 r3630 141 141 getNAFileClass = nappy.utils.common_utils.getNAFileClass 142 142 __version__ = nappy.utils.common_utils.getVersion() 143 default_delimiter = nappy.utils.common_utils.getDefault("default_delimiter") 144 default_float_format = nappy.utils.common_utils.getDefault("default_float_format") 143 145 144 146 -
nappy/trunk/nappy/nc_interface/nc_to_na.py
r3615 r3630 35 35 # Define global variables 36 36 DEBUG = nappy.utils.getDebug() 37 default_delimiter = nappy.utils.getDefault("default_delimiter") 38 default_float_format = nappy.utils.getDefault("default_float_format") 39 37 40 38 41 class NCToNA(nappy.nc_interface.cdms_to_na.CDMSToNA): … … 118 121 return file_names 119 122 120 def writeNAFiles(self, na_file=None, delimiter= " ",121 float_format= "%g", size_limit=None):123 def writeNAFiles(self, na_file=None, delimiter=default_delimiter, 124 float_format=default_float_format, size_limit=None): 122 125 """ 123 126 Writes the self.na_dict_list content to one or more NASA Ames files. -
nappy/trunk/nappy/utils/__init__.py
r3406 r3630 1 1 from parse_config import getConfigDict 2 from common_utils import getDebug, getVersion 2 from common_utils import getDebug, getVersion, getDefault -
nappy/trunk/nappy/utils/common_utils.py
r3628 r3630 152 152 return d 153 153 154 def getAnnotation(item, annotation, delimiter = ', '): 154 155 def getAnnotation(item, annotation, delimiter=None): 155 156 """ 156 157 Returns the annotation string for a given NASA Ames item. 157 158 """ 158 159 if delimiter == None: 160 delimiter = getDefault("default_delimiter") 159 161 dict = parse_config.getAnnotationsConfigDict() 160 162 if annotation: return dict[item] + delimiter 161 163 else: return '' 164 162 165 163 166 def annotateLines(item_name, annotate, delimiter, lines):
Note: See TracChangeset
for help on using the changeset viewer.