# Python Platform Module

The `platform` module provides an API to access the underlying platform's identifying data, such as hardware, operating system, and interpreter version information.

## Importing the Module

```python
import platform
```

## System Information

### `platform.system()`

Returns the system/OS name, such as 'Linux', 'Darwin', 'Java', 'Windows'. An empty string is returned if the value cannot be determined.

```python
import platform

print(platform.system())
```

### `platform.release()`

Returns the system's release, e.g. '2.2.0' or 'NT'.

```python
print(platform.release())
```

### `platform.version()`

Returns the system's release version.

```python
print(platform.version())
```

## Hardware Information

### `platform.machine()`

Returns the machine type, e.g. 'i386'.

```python
print(platform.machine())
```

### `platform.processor()`

Returns the (real) processor name, e.g. 'amdk6'.

```python
print(platform.processor())
```

### `platform.uname()`

Returns a `namedtuple` containing system, node, release, version, machine, and processor.

```python
print(platform.uname())
```

## Python Version

### `platform.python_version()`

Returns the Python version as string 'major.minor.patchlevel'.

```python
print(platform.python_version())
```

[[programming/python/python]]