Changeset 370 in lmdz_wrf for trunk


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

Fixing real folder name...

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing_tools.py

    r369 r370  
    720720        quit()
    721721
    722     folderins = sub.Popen(["pwd"], stdout=sub.PIPE)
    723     folder = list(folderins.communicate())[0].replace('\n','')
     722# This does not work....
     723#    folderins = sub.Popen(["pwd"], stdout=sub.PIPE)
     724#    folder = list(folderins.communicate())[0].replace('\n','')
     725# From http://stackoverflow.com/questions/4934806/how-can-i-find-scripts-directory-with-python
     726    folder = os.path.dirname(os.path.realpath(__file__))
    724727
    725728    infile = folder + '/variables_values.dat'
  • 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.