clearml_agent/commands/worker.py
def _get_python_version_suffix(executable_path):
        # type: (Text) -> Text
        """
        Platform independent function that returns version substring from the python executable
        """

        def rreplace(s, old, new, count):
            return (s[::-1].replace(old[::-1], new[::-1], count))[::-1]

        if is_windows_platform():
            return rreplace(
                rreplace(executable_path.split(os.path.sep)[-1].lower(), 'python', '', 1),
                '.exe', '', 1
            )

        return rreplace(executable_path.split(os.path.sep)[-1], 'python', '', 1)

        Platform independent function that returns version substring from the python executable
        
Platform independent function that returns version substring from the python executable
Platform independent function that returns version substring from the python executable
def _get_python_version_suffix(executable_path):
        def rreplace(s, old, new, count):
            return (s[::-1].replace(old[::-1], new[::-1], count))[::-1]
        if is_windows_platform():
            return rreplace(
                rreplace(executable_path.split(os.path.sep)[-1].lower(), 'python', '', 1),
                '.exe', '', 1
            )
        return rreplace(executable_path.split(os.path.sep)[-1], 'python', '', 1)
def _get_python_version_suffix ( executable_path ) : def rreplace ( s , old , new , count ) : return ( s [ : : - 1 ] . replace ( old [ : : - 1 ] , new [ : : - 1 ] , count ) ) [ : : - 1 ] if is_windows_platform ( ) : return rreplace ( rreplace ( executable_path . split ( os . path . sep ) [ - 1 ] . lower ( ) , 'python' , '' , 1 ) , '.exe' , '' , 1 ) return rreplace ( executable_path . split ( os . path . sep ) [ - 1 ] , 'python' , '' , 1 )
Platform independent function that returns version substring from the python executable
Platform independent function that returns version substring from the python executable
# type: (Text) -> Text """
        Platform independent function that returns version substring from the python executable
        """
executable_path