Changeset 370 in lmdz_wrf for trunk/tools/nc_var_tools.py


Ignore:
Timestamp:
Mar 19, 2015, 6:35:51 PM (10 years ago)
Author:
lfita
Message:

Fixing real folder name...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r369 r370  
    168168        quit()
    169169
    170     folderins = sub.Popen(["pwd"], stdout=sub.PIPE)
    171     folder = list(folderins.communicate())[0].replace('\n','')
     170# This does not work....
     171#    folderins = sub.Popen(["pwd"], stdout=sub.PIPE)
     172#    folder = list(folderins.communicate())[0].replace('\n','')
     173# From http://stackoverflow.com/questions/4934806/how-can-i-find-scripts-directory-with-python
     174    folder = os.path.dirname(os.path.realpath(__file__))
    172175
    173176    infile = folder + '/variables_values.dat'
Note: See TracChangeset for help on using the changeset viewer.