Ignore:
Timestamp:
Sep 23, 2018, 11:40:28 AM (6 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
4971f63
Parents:
5d42acd
Message:

changed whole tree structure of flex_extract to have better overview

File:
1 moved

Legend:

Unmodified
Added
Removed
  • source/pythontest/TestInstallTar/flex_extract_v7.1_ecgate/source/python/mods/tools.py

    r2fb99de r25b14be  
    140140    @Input:
    141141        filename: string
    142             Name of file where the ECMWV environment parameters are stored.
     142            Path to file where the ECMWV environment parameters are stored.
    143143
    144144    @Return:
    145145        envs: dict
     146            Contains the environment parameter ecuid, ecgid, gateway
     147            and destination for ECMWF server environments.
    146148    '''
    147149    envs= {}
    148     print filename
     150
    149151    with open(filename, 'r') as f:
    150152        for line in f:
     
    178180    '''
    179181
    180     print "clean_up"
     182    print("clean_up")
    181183
    182184    cleanlist = glob.glob(c.inputdir + "/*")
     
    187189            silent_remove(clist)
    188190
    189     print "Done"
     191    print("Done")
    190192
    191193    return
     
    211213    '''
    212214
    213     print message
     215    print(message)
    214216
    215217    # comment if user does not want email notification directly from python
     
    227229            pout = p.communicate(input=message + '\n\n' + trace)[0]
    228230        except ValueError as e:
    229             print 'ERROR: ', e
     231            print('ERROR: ', e)
    230232            sys.exit('Email could not be sent!')
    231233        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())
    234236
    235237    sys.exit(1)
     
    256258
    257259    '''
    258     print message
     260    print(message)
    259261
    260262    # comment if user does not want notification directly from python
     
    271273            pout = p.communicate(input=message+'\n\n')[0]
    272274        except ValueError as e:
    273             print 'ERROR: ', e
    274             print 'Email could not be sent!'
     275            print('ERROR: ', e)
     276            print('Email could not be sent!')
    275277        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())
    278280
    279281    return
     
    395397                break
    396398        else:
    397             print 'Warning: par ' + par + ' not found in table 128'
     399            print('Warning: par ' + par + ' not found in table 128')
    398400
    399401    return ipar
     
    441443            raise # re-raise exception if a different error occured
    442444        else:
    443             print 'WARNING: Directory {0} already exists!'.format(directory)
     445            print('WARNING: Directory {0} already exists!'.format(directory))
    444446
    445447    return
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG