#NEWLINE# def find_cmd( env , cmd , args ) : #NEWLINE# #INDENT# 'Retrieve location of a command, checking in installation directory.\n    ' #NEWLINE# local_cmd = os . path . join ( env . system_install , 'bin' , cmd ) #NEWLINE# for cmd in [ local_cmd , cmd ] : #NEWLINE# #INDENT# with quiet ( ) : #NEWLINE# #INDENT# test_version = env . safe_run ( ( '%s %s' % ( cmd , args ) ) ) #NEWLINE# #UNINDENT# if test_version . succeeded : #NEWLINE# #INDENT# return local_cmd #NEWLINE# #UNINDENT# #UNINDENT# return None