Changeset 8146


Ignore:
Timestamp:
Mar 11, 2011, 3:52:42 PM (13 years ago)
Author:
wilsonr
Message:

Removed '@brief' comments.

Location:
trunk/anuga_core/source/anuga/utilities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/file_utils.py

    r8109 r8146  
    8282
    8383
    84 ##
    85 # @brief Delete directory and all sub-directories.
    86 # @param path Path to the directory to delete.
    8784def del_dir(path):
    8885    """Recursively delete directory path and all its contents
     
    104101
    105102
    106 ##
    107 # @brief ??
    108 # @param path
    109 # @param __func__
    110 # @param verbose True if this function is to be verbose.
    111 # @note ANOTHER OPTION, IF NEED IN THE FUTURE, Nick B 7/2007
    112103def rmgeneric(path, func, verbose=False):
    113104    ERROR_STR= """Error removing %(path)s, %(error)s """
     
    120111
    121112
    122 ##
    123 # @brief Remove directory and all sub-directories.
    124 # @param path Filesystem path to directory to remove.
    125 # @param verbose True if this function is to be verbose.
    126113def removeall(path, verbose=False):
    127114    if not os.path.isdir(path):
     
    139126
    140127
    141 ##
    142 # @brief Create a standard filename.
    143 # @param datadir Directory where file is to be created.
    144 # @param filename Filename 'stem'.
    145 # @param format Format of the file, becomes filename extension.
    146 # @param size Size of file, becomes part of filename.
    147 # @param time Time (float), becomes part of filename.
    148 # @return The complete filename path, including directory.
    149 # @note The containing directory is created, if necessary.
    150128def create_filename(datadir, filename, format, size=None, time=None):
     129    """Create a standard filename.
     130
     131    datadir   directory where file is to be created
     132    filename  filename 'stem'
     133    format    format of the file, becomes filename extension
     134    size      size of file, becomes part of filename
     135    time      time (float), becomes part of filename
     136
     137    Returns the complete filename path, including directory.
     138
     139    The containing directory is created, if necessary.
     140    """
     141
    151142    FN = check_dir(datadir) + filename
    152143
     
    162153
    163154
    164 ##
    165 # @brief Get all files with a standard name and a given set of attributes.
    166 # @param datadir Directory files must be in.
    167 # @param filename Filename stem.
    168 # @param format Filename extension.
    169 # @param size Filename size.
    170 # @return A list of fielnames (including directory) that match the attributes.
    171155def get_files(datadir, filename, format, size):
    172156    """Get all file (names) with given name, size and format
     
    181165
    182166
    183 ##
    184 # @brief Find all files in a directory that contain a given string.
    185 # @param look_in_dir Path to the directory to look in.
    186 # @param base_name String that files must contain.
    187 # @param verbose True if this function is to be verbose.
    188167def get_all_directories_with_name(look_in_dir='', base_name='', verbose=False):
    189168    '''
     
    215194
    216195
    217 ##
    218 # @brief Find all SWW files in a directory with given stem name.
    219 # @param look_in_dir The directory to look in.
    220 # @param base_name The file stem name.
    221 # @param verbose True if this function is to be verbose.
    222 # @return A list of found filename strings.
    223 # @note Will accept 'base_name' with or without '.sww' extension.
    224 # @note If no files found, raises IOError exception.
    225196def get_all_swwfiles(look_in_dir='', base_name='', verbose=False):
    226197    '''
     
    259230
    260231
    261 ##
    262 # @brief Find all files in a directory that contain a string and have extension.
    263 # @param look_in_dir Path to the directory to look in.
    264 # @param base_name Stem filename of the file(s) of interest.
    265 # @param extension Extension of the files to look for.
    266 # @param verbose True if this function is to be verbose.
    267 # @return A list of found filename strings.
    268 # @note If no files found, raises IOError exception.
    269232def get_all_files_with_extension(look_in_dir='',
    270233                                 base_name='',
     
    317280    """
    318281
    319     ##
    320     # @brief copies a file or sequence to destination directory.
    321     # @param dest The destination directory to copy to.
    322     # @param file A filename string or sequence of filename strings.
    323282    def copy_file_or_sequence(dest, file):
    324283        if hasattr(file, '__iter__'):
  • trunk/anuga_core/source/anuga/utilities/numerical_tools.py

    r8125 r8146  
    230230
    231231
    232 ##
    233 # @brief Ensure that a sequence is a numeric array of the required type.
    234 # @param A The sequence object to convert to a numeric array.
    235 # @param typecode The required numeric type of object A (a numeric dtype).
    236 # @return A numeric array of the required type.
    237232def ensure_numeric(A, typecode=None):
    238233    """Ensure that sequence is a numeric array.
     
    375370################################################################################
    376371
    377 ##
    378 # @brief Decide if an object is a numeric package object with datatype of float.
    379 # @param obj The object to decide on.
    380 # @return True if 'obj' is a numeric package object, and some sort of float.
    381372def is_num_float(obj):
    382373    '''Is an object a numeric package float object?'''
     
    387378        return False
    388379
    389 ##
    390 # @brief Decide if an object is a numeric package object with datatype of int.
    391 # @param obj The object to decide on.
    392 # @return True if 'obj' is a numeric package object, and some sort of int.
    393380def is_num_int(obj):
    394381    '''Is an object a numeric package int object?'''
  • trunk/anuga_core/source/anuga/utilities/terminal_width.py

    r6909 r8146  
    88######
    99
    10 ##
    11 # @brief Get the current terminal width.
    12 # @return The terminal width in characters.
    13 # @note If the width cannot be found, return 80 as a default.
    1410def terminal_width():
     11    """Get the current terminal width.
     12
     13    Returns the terminal width in characters.
     14
     15    If the width cannot be found, return 80 as a default.
     16    """
     17
    1518    # First, try Windows.
    1619    try:
  • trunk/anuga_core/source/anuga/utilities/test_system_tools.py

    r7486 r8146  
    227227################################################################################
    228228
    229     ##
    230     # @brief Helper function to write a list of strings to a NetCDF file.
    231     # @param filename Path to the file to write.
    232     # @param l The list of strings to write.
    233229    def helper_write_msh_file(self, filename, l):
    234230        # open the NetCDF file
     
    250246
    251247
    252     ##
    253     # @brief Helper function to read a NetCDF file and return a list of strings.
    254     # @param filename Path to the file to read.
    255     # @return A list of strings from the file.
    256248    def helper_read_msh_file(self, filename):
    257249        fid = NetCDFFile(filename, netcdf_mode_r)
Note: See TracChangeset for help on using the changeset viewer.