Skip to content

Commit

Permalink
extra paths appended to front of existing path
Browse files Browse the repository at this point in the history
  • Loading branch information
wtbarnes committed Sep 20, 2021
1 parent ee9d11d commit ea61ff8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion hissw/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class Environment(object):
ssw_paths : list, optional
List of SSW paths to pass to `ssw_path`
extra_paths : list, optional
Additional paths to add to the IDL namespace
Additional paths to add to the IDL namespace. Note that these
are appended to the front of the path such that they take
precedence over the existing path.
ssw_home : str, optional
Root of SSW tree
idl_home : str, optional
Expand Down Expand Up @@ -106,6 +108,8 @@ def run(self, script, args=None, save_vars=None, verbose=True):
save_vars : list, optional
Variables to save and return from the IDL namespace
verbose : bool, optional
If True, print STDERR and SDOUT. Otherwise it will be
suppressed. This is useful for debugging.
"""
args = {} if args is None else args
with tempfile.TemporaryDirectory() as tmpdir:
Expand Down
2 changes: 1 addition & 1 deletion hissw/templates/parent.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ssw_path,/{{ ssw_paths | join(', /') }}
{% endif %}
;add any other paths we need to the IDL path
!PATH=!PATH{%for p in extra_paths%}+':'+EXPAND_PATH('{{ p }}'){%endfor%}
!PATH={%for p in extra_paths%}EXPAND_PATH('{{ p }}')+':'+{%endfor%}!PATH
;run user scripts
.run {{ procedure_filename }}
hissw_procedure
Expand Down

0 comments on commit ea61ff8

Please sign in to comment.