Changes between Version 2 and Version 3 of DX/DXCodeReuse


Ignore:
Timestamp:
02/02/07 12:48:31 (12 years ago)
Author:
astephen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DX/DXCodeReuse

    v2 v3  
    33Here is a list of code objects that you might be able to re-use in the Data Extractor. Please ask me (Ag) is you want more information on any of this: 
    44 
    5 '''SessionObject.py''' 
     5'''!SessionObject.py''' 
    66 
    77A persistent session manager. Saves session into a dictionary-like object (using python’s “shelve” module). 
    88 
    9 '''DateTimeManager.py'''  
     9'''!DateTimeManager.py'''  
    1010 
    1111Useful class and functions for generating long lists of dates/times from a basic constructor such as: 
     
    1717Also allows you to add a unit of time to an existing DateTime object such as: 
    1818 
     19{{{ 
    1920dt.add(12, “days”) 
     21}}} 
    2022 
    21 FileNames.py 
     23'''!FileNames.py''' 
     24 
    2225Generates a list of file names based on some configuration information such as Dataset Group, Dataset, Variable, Date, Time, Domain, Format etc. 
    2326 
    24 OptionHandler.py 
     27'''!OptionHandler.py''' 
     28 
    2529Evaluates what the session currently contains and then returns appropriate “next” set of user options based on a pre-defined hierarchy of selections. 
    2630 
    27 dxvv – Virtual Variable handler 
     31'''dxvv – Virtual Variable handler''' 
    2832Method of providing the DX with a definition of “virtual variables” that are generated on the fly from existing variables. This requires data to be held in cdms-style objects. 
    2933 
    30 Bits of functionality in the DX that might/will be needed in a replacement tool 
     34=== Bits of functionality in the DX that might/will be needed in a replacement tool === 
    3135 
    3236The following list presents functionality that the DX has partially or totally solved, it might be worth looking to reuse this code: 
     
    4347 * GRIB output (wrapping ECMWF fortran executables) 
    4448 
    45 And some more with one line docs: 
     49=== And some more with one line docs - from common.py === 
    4650 
    47 from common.py 
    48  
     51{{{ 
    4952(year, month, day, hour, minute, second) = getDateTimeComponents(dateTimeString) 
     53}}} 
    5054# Takes in a time string in standard DateTime format and returns the items in it. 
    5155 
     56{{{ 
    52571|0 = keyPatternMatch(dct, pattern, mode="string match") 
     58}}} 
    5359# Returns 1 if one or more keys in the dictionary 'dct' match the pattern provided using string.find(). Returns 0 otherwise. 
    5460