def get_external_downloader(external_downloader):
 bn = os.path.splitext(os.path.basename(external_downloader))[0]
 return _BY_NAME[bn]

def get_external_downloader ( external_downloader ) : bn = os . path . splitext ( os . path . basename ( external_downloader ) ) [ 0 ] return _BY_NAME [ bn ]
given the name of the executable .