Changeset 25b14be in flex_extract.git for source/pythontest/TestInstallTar/flex_extract_v7.1_ecgate/source/python/mods/tools.py
- Timestamp:
- Sep 23, 2018, 11:40:28 AM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 4971f63
- Parents:
- 5d42acd
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
source/pythontest/TestInstallTar/flex_extract_v7.1_ecgate/source/python/mods/tools.py
r2fb99de r25b14be 140 140 @Input: 141 141 filename: string 142 Name offile where the ECMWV environment parameters are stored.142 Path to file where the ECMWV environment parameters are stored. 143 143 144 144 @Return: 145 145 envs: dict 146 Contains the environment parameter ecuid, ecgid, gateway 147 and destination for ECMWF server environments. 146 148 ''' 147 149 envs= {} 148 print filename 150 149 151 with open(filename, 'r') as f: 150 152 for line in f: … … 178 180 ''' 179 181 180 print "clean_up"182 print("clean_up") 181 183 182 184 cleanlist = glob.glob(c.inputdir + "/*") … … 187 189 silent_remove(clist) 188 190 189 print "Done"191 print("Done") 190 192 191 193 return … … 211 213 ''' 212 214 213 print message215 print(message) 214 216 215 217 # comment if user does not want email notification directly from python … … 227 229 pout = p.communicate(input=message + '\n\n' + trace)[0] 228 230 except ValueError as e: 229 print 'ERROR: ', e231 print('ERROR: ', e) 230 232 sys.exit('Email could not be sent!') 231 233 else: 232 print 'Email sent to ' + os.path.expandvars(user) + ' ' + \233 pout.decode() 234 print('Email sent to ' + os.path.expandvars(user) + ' ' + 235 pout.decode()) 234 236 235 237 sys.exit(1) … … 256 258 257 259 ''' 258 print message260 print(message) 259 261 260 262 # comment if user does not want notification directly from python … … 271 273 pout = p.communicate(input=message+'\n\n')[0] 272 274 except ValueError as e: 273 print 'ERROR: ', e274 print 'Email could not be sent!'275 print('ERROR: ', e) 276 print('Email could not be sent!') 275 277 else: 276 print 'Email sent to ' + os.path.expandvars(user) + ' ' + \277 pout.decode() 278 print('Email sent to ' + os.path.expandvars(user) + ' ' + 279 pout.decode()) 278 280 279 281 return … … 395 397 break 396 398 else: 397 print 'Warning: par ' + par + ' not found in table 128'399 print('Warning: par ' + par + ' not found in table 128') 398 400 399 401 return ipar … … 441 443 raise # re-raise exception if a different error occured 442 444 else: 443 print 'WARNING: Directory {0} already exists!'.format(directory)445 print('WARNING: Directory {0} already exists!'.format(directory)) 444 446 445 447 return
Note: See TracChangeset
for help on using the changeset viewer.