Ignore:
Timestamp:
02/11/05 14:37:03 (19 years ago)
Author:
mar637
Message:

Added handling of environment variables throughout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asaplot.py

    r376 r411  
    626626           
    627627        d = ['png','.ps','eps']
     628
     629        from os.path import expandvars
     630        fname = expandvars(fname)
     631
    628632        if fname[-3:].lower() in d:
    629633            try:
     
    676680
    677681
    678 def load_colours(file='/usr/local/lib/rgb.txt'):
     682def load_colours(filename='/usr/local/lib/rgb.txt'):
    679683    """
    680684    Load the colour dictionary from the specified file.
    681685    """
    682686    print 'Loading colour dictionary from', file
    683     rgb = open(file, 'r')
     687    from os.path import expandvars
     688    filename = expandvars(filename)
     689    rgb = open(filename, 'r')
    684690
    685691    while True:
Note: See TracChangeset for help on using the changeset viewer.