()
return platform.processor()
Returns the processor name in the system
Returns the processor name in the system
Returns the processor name in the system
def get_processor_name():
    """ Returns the processor name in the system """
    if platform.system() == "Linux":
        with open("/proc/cpuinfo", "rb") as cpuinfo:
            all_info = cpuinfo.readlines()
            for line in all_info:
                if b'model name' in line:
                    return re.sub(b'.*model name.*:', b'', line, 1)
    elif platform.system() == "FreeBSD":
        cmd = ["sysctl", "-n", "hw.model"]
        process = subprocess.Popen(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
        )
        str_value = process.stdout.read()
        return str_value
    elif platform.system() == "Darwin":
        cmd = ['sysctl', '-n', 'machdep.cpu.brand_string']
        process = subprocess.Popen(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
        )
        str_value = process.stdout.read()
        return str_value

    return platform.processor()
def get_processor_name ( ) : if platform . system ( ) == "Linux" : with open ( "/proc/cpuinfo" , "rb" ) as cpuinfo : all_info = cpuinfo . readlines ( ) for line in all_info : if b'model name' in line : return re . sub ( b'.*model name.*:' , b'' , line , 1 ) elif platform . system ( ) == "FreeBSD" : cmd = [ "sysctl" , "-n" , "hw.model" ] process = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . PIPE , ) str_value = process . stdout . read ( ) return str_value elif platform . system ( ) == "Darwin" : cmd = [ 'sysctl' , '-n' , 'machdep.cpu.brand_string' ] process = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . PIPE , ) str_value = process . stdout . read ( ) return str_value return platform . processor ( )