Skip to content

Settings

Overview

The system module provides system-level configuration information, so developers can keep the configuration consistent with the system when developing applications.

settings.temp_unit()

  • Description: Controls the display unit of temperature. The user can choose to display it in Celsius or Fahrenheit based on this attribute.
  • Return Value: 1 (Celsius) or 0 (Fahrenheit).
  • Default: Fahrenheit.

settings.hour24()

  • Description: Controls the display format of the clock. Users can choose to display it in 12-hour or 24-hour format based on this attribute.
  • Return Value: False (12-hour clock) or True (24-hour clock).
  • Default: True.

Usage examples

import settings

# Get the temperature unit
temp_unit = settings.temp_unit()

# Get the time format
use_hour24 = settings.hour24()