Changeset 997 in lmdz_wrf for trunk/tools
- Timestamp:
- Aug 10, 2016, 4:19:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r996 r997 36 36 # dictionary_key: Function to provide the first key in a dictionay with a given value 37 37 # dictionary_key_list: Function to provide the first key in a dictionay of lists with a given value 38 # dict VeysVals_stringList: Function to provide strings from a dictionary with keys which contain values of lists38 # dictKeysVals_stringList: Function to provide strings from a dictionary with keys which contain values of lists 39 39 # files_folder_HMT: Function to retrieve a list of files from a folder [fold] and files with [head]*[middle]*[tail] 40 40 # get_configuration: Function to get the configuration from an ASCII external file … … 7918 7918 def str_list(string, cdiv): 7919 7919 """ Function to obtain a list from a string givin a split character 7920 string= Str ring from which to obtain a list ('None' for None)7920 string= String from which to obtain a list ('None' for None) 7921 7921 cdiv= character to use to split the string 7922 7922 >>> str_list('1:@#:$:56', ':') … … 8208 8208 return newdictv 8209 8209 8210 def dict VeysVals_stringList(dictv,cD=',',cK='@',cV='|'):8210 def dictKeysVals_stringList(dictv,cD=',',cK='@',cV='|'): 8211 8211 """ Function to provide strings from a dictionary with keys which contain values of lists 8212 8212 dictv= dictionary with the values … … 8215 8215 cV= character to use to separate the values for each key 8216 8216 >>> dictvals = {'Spain': ['Madrid', 'Santander', 'Sevilla', 'Toledo'], 'France': ['Paris', 'Marseille', 'Tolouse']} 8217 >>> dictKeysVals_stringList(dictvals) 8217 8218 Spain@Madrid|Santander|Sevilla|Toledo,France@Paris|Marseille|Tolouse 8218 8219 """ 8219 fname = 'dict VeysVals_stringList'8220 fname = 'dictKeysVals_stringList' 8220 8221 8221 8222 ik = 1
Note: See TracChangeset
for help on using the changeset viewer.