B t `s@sFdddgZddlZddlmZedZddZd ddZd d dZdS) register_executableregistered_executableunregister_executableN) CachedFactoryZ executablescCst|dS)N)ExecutableFactory unregister)namer ?/tmp/pip-unpacked-wheel-cqckmaqz/pyutilib/factory/executable.pyrscs0tkr dStGfdddt}dS)Ncs"eZdZfddZddZdS)z register_executable..TMPcs$d|_tjjtjjdd|_dS)NT)Z implicitExt executablevalidate)r pyutilibmiscZ search_fileZexecutable_extension exec_default)self)rr r r __init__!s z)register_executable..TMP.__init__cSs|jr |jS|jS)N)r r)rr r r get_path)sz)register_executable..TMP.get_pathN)__name__ __module__ __qualname__rrr )rr r r TMPsr)rregisterobject)rr rr )rr r rscCs<|dkrtttS|tkr8t|}|dkr4dS|SdS)a Test if an exectuable is registered. If 'name' is None, then return a list of the names of all registered executables that are enabled. If this executable is not registered or it cannot be found, then None is returned. Otherwise, return the path to the executable. NOTE: Since ExecutableFactory is cached, the search for the executable only happens the first time the user calls registered_executable. N)sortedlistrr)rtmpr r r r/s  )N)N) __all__Z pyutilib.miscr Zpyutilib.factory.factoryrrrrrr r r r  s