Executables now have a useful __str__ function.
This commit is contained in:
parent
53feb12ea0
commit
eb9859ce75
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,11 @@ def __repr__(self):
|
|||
return "<exe: %s>" % 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))
|
||||
|
|
Loading…
Reference in a new issue