From eb9859ce750def63db8bc436338f94e875276a2e Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 6 Jun 2015 16:15:34 -0700 Subject: Executables now have a useful __str__ function. --- lib/spack/spack/util/executable.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 6eede0f78e..1dcda0d87f 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -124,6 +124,11 @@ class Executable(object): return "" % self.exe + def __str__(self): + return ' '.join(self.exe) + + + def which(name, **kwargs): """Finds an executable in the path like command-line which.""" path = kwargs.get('path', os.environ.get('PATH', '').split(os.pathsep)) -- cgit v1.2.3-60-g2f50