Changeset 997 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Aug 10, 2016, 4:19:38 PM (8 years ago)
Author:
lfita
Message:

Changing name from dictrVeysVals_stringList' to dictKeysVals_stringList'
Other minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r996 r997  
    3636# dictionary_key: Function to provide the first key in a dictionay with a given value
    3737# dictionary_key_list: Function to provide the first key in a dictionay of lists with a given value
    38 # dictVeysVals_stringList: Function to provide strings from a dictionary with keys which contain values of lists
     38# dictKeysVals_stringList: Function to provide strings from a dictionary with keys which contain values of lists
    3939# files_folder_HMT: Function to retrieve a list of files from a folder [fold] and files with [head]*[middle]*[tail]
    4040# get_configuration: Function to get the configuration from an ASCII external file
     
    79187918def str_list(string, cdiv):
    79197919    """ Function to obtain a list from a string givin a split character
    7920       string= Strring from which to obtain a list ('None' for None)
     7920      string= String from which to obtain a list ('None' for None)
    79217921      cdiv= character to use to split the string
    79227922    >>> str_list('1:@#:$:56', ':')
     
    82088208    return newdictv
    82098209
    8210 def dictVeysVals_stringList(dictv,cD=',',cK='@',cV='|'):
     8210def dictKeysVals_stringList(dictv,cD=',',cK='@',cV='|'):
    82118211    """ Function to provide strings from a dictionary with keys which contain values of lists
    82128212      dictv= dictionary with the values
     
    82158215      cV= character to use to separate the values for each key
    82168216    >>> dictvals = {'Spain': ['Madrid', 'Santander', 'Sevilla', 'Toledo'], 'France': ['Paris', 'Marseille', 'Tolouse']}
     8217    >>> dictKeysVals_stringList(dictvals)
    82178218    Spain@Madrid|Santander|Sevilla|Toledo,France@Paris|Marseille|Tolouse
    82188219    """
    8219     fname = 'dictVeysVals_stringList'
     8220    fname = 'dictKeysVals_stringList'
    82208221
    82218222    ik = 1
Note: See TracChangeset for help on using the changeset viewer.