Did I find the right examples for you? yes no

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)
Tries to find the program on the system path.
Returns the path if it is found or None if it's not found.

        def whereis_exe(program):
    ''' Tries to find the program on the system path.
        Returns the path if it is found or None if it's not found.
    '''
    for path in os.environ.get('PATH', '').split(':'):
        if os.path.exists(os.path.join(path, program)) and \
            not os.path.isdir(os.path.join(path, program)):
            return os.path.join(path, program)
    return None
        


src/s/l/sl4a_pydroid_mock_api-0.4.1/src/android/ttsspeak.py   sl4a_pydroid_mock_api(Download)
import sys
 
from utils import whereis_exe
 
 
# Platform-specific searches
if sys.platform == "darwin":
    if whereis_exe('say'):
        ttsSpeak = ttsSpeak_osx
    elif whereis_exe('espeak'):
        ttsSpeak = ttsSpeak_espeak
 
elif sys.platform.startswith('linux'):
    if whereis_exe('espeak'):
    if whereis_exe('espeak'):
        ttsSpeak = ttsSpeak_espeak
    elif whereis_exe('flite'):
        ttsSpeak = ttsSpeak_flite