Return a string identifying the operating system the application
    is running on.

    :rtype: str
438523
def operating_system():
    
    if platform.system() == 'Darwin':
        return 'OS X Version %s' % platform.mac_ver()[0]
    distribution = ' '.join(platform.linux_distribution()).strip()
    os_platform = platform.platform(True, True)
    if distribution:
        os_platform += ' (%s)' % distribution
    return os_platform
357895
def _version_string():
    
    platform_system = platform.system()
    if platform_system == 'Linux':
        os_name, os_version, _ = platform.dist()
    else:
        os_name = platform_system
        os_version = platform.version()
    python_version = platform.python_version()
    return 'trytravis %s (%s %s, python %s)' % (__version__,
                                                os_name.lower(),
                                                os_version,
                                                python_version)
1020286
def os_info():
    
    return {
        'uname': dict(platform.uname()._asdict()),
        'path': os.environ.get('PATH', '').split(':'),
        'shell': os.environ.get('SHELL', '/bin/sh'),
    }
1076062
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)

    return platform.processor()
422097
def get_installed_version(self):
        """"""
        if self.check():
            return '%s (%s)' % (self.installed_version, self.OK)
        else:
            return '%s (%s)' % (self.installed_version, self.NOK)
132620
def get_sys_executable():
    
    if sys.executable:
        return sys.executable

    global _sys_executable_warning_logged
    if not _sys_executable_warning_logged:
        LOG.warn(SYS_EXECUTABLE_MSG)
        _sys_executable_warning_logged = True

    return '/usr/bin/python'
301210
private OsType determineOsType(String imageId) {
        InspectImageResponse ir = getClient().inspectImageCmd(imageId).exec();
        if ("linux".equalsIgnoreCase(ir.getOs())) {
            LOG.trace("Detected LINUX operating system for image: {}", imageId);
            return OsType.LINUX;
        } else if ("windows".equalsIgnoreCase(ir.getOs())) {
            LOG.trace("Detected WINDOWS operating system for image: {}", imageId);
            return OsType.WINDOWS;
        } else {
            LOG.trace("Detected OTHER operating system ({}) for image: {}", ir.getOs(), imageId);
            return OsType.OTHER;
        }
    }
927005
def platform(cls):
        
        system_name = platform.system()
        if system_name == "Linux":
            libc = cls.libc()
            return "unknown-linux-{libc}".format(libc=libc)
        elif system_name == "Darwin":
            return "apple-darwin"
        else:
            return "unknown"
524302
def get_python_version(self) -> str:
        
        if self.python_version is None:
            python_version = platform.python_version()
        else:
            python_version = self.python_version

        return python_version
1268261
def construct_evm_runtime_identifier() -> str:
    
    return "Py-EVM/{0}/{platform}/{imp.name}{v.major}.{v.minor}.{v.micro}".format(
        __version__,
        platform=sys.platform,
        v=sys.version_info,
        # mypy Doesn't recognize the `sys` module as having an `implementation` attribute.
        imp=sys.implementation,
    )
681713
def os_is_running(pid):
    '''
    
    '''
    if isinstance(pid, six.string_types):
        pid = int(pid)
    if HAS_PSUTIL:
        return psutil.pid_exists(pid)
    else:
        try:
            os.kill(pid, 0)  # SIG 0 is the "are you alive?" signal
            return True
        except OSError:
            return False
787055
public function getOperatingSystem()
	{
		switch (true) {
			case stristr(PHP_OS, 'DAR'):
				return self::OS_OSX;
			case stristr(PHP_OS, 'WIN'):
				return self::OS_WIN;
			case stristr(PHP_OS, 'LINUX'):
				return self::OS_LINUX;
			default:
				return self::OS_UNKNOWN;
		}
	}
637495
def driver_name(self):
        
        self._driver_name, value = self.get_attr_string(self._driver_name, 'driver_name')
        return value
409636
public static OSType getOperatingSystemType() {
		if (detectedOS == null) {
			String OS = System.getProperty("os.name", "generic").toLowerCase(
					Locale.ENGLISH);
			if ((OS.indexOf("mac") >= 0) || (OS.indexOf("darwin") >= 0)) {
				detectedOS = OSType.MacOS;
			} else if (OS.indexOf("win") >= 0) {
				detectedOS = OSType.Windows;
			} else if (OS.indexOf("nux") >= 0) {
				detectedOS = OSType.Linux;
			} else {
				detectedOS = OSType.Other;
			}
		}
		return detectedOS;
	}
611920
def name(self):
        
        # Name, explicitely set for the pane.
        if self.chosen_name:
            return self.chosen_name
        else:
            # Name from the process running inside the pane.
            name = self.process.get_name()
            if name:
                return os.path.basename(name)

        return ''
117296
def _windows_system_appdata():
    
    # Could also use os.environ['ALLUSERSPROFILE'] - maybe?
    csidl_common_appdata = 35
    sh_get_folder_path = windll.shell32.SHGetFolderPathW
    sh_get_folder_path.argtypes = [wintypes.HWND,
                                   ctypes.c_int,
                                   wintypes.HANDLE,
                                   wintypes.DWORD,
                                   wintypes.LPCWSTR]
    path_buf = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
    result = sh_get_folder_path(0, csidl_common_appdata, 0, 0, path_buf)
    return str(path_buf.value)
1252199
def pyVersionStr(self):
        
        from sys import version_info

        return "Python Interpreter Version: {}.{}.{}".format(version_info.major,
                                                             version_info.minor,
                                                             version_info.micro)