Skip to content

Commit

Permalink
add the DEGREE, DEGREE_C and DEGREE_F constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed Mar 10, 2022
1 parent 33abbb4 commit 93434e0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions msl/qt/constants.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
"""
Constants used by the **MSL-Qt** package.
Package constants.
"""
import os
from enum import Enum

HOME_DIR = os.path.join(os.path.expanduser('~'), '.msl')
""":class:`str`: The default ``$HOME`` directory where all files used by **MSL-Qt** are located."""
""":class:`str`: The default ``$HOME`` directory where all files used by the package are located."""

SI_PREFIX_MAP = {i: prefix for i, prefix in enumerate('yzafpn\u00b5m kMGTPEZY', start=-8)}
""":class:`dict`: The SI prefixes used to form multiples of 10**(3*n), n=-8..8"""

DEGREE = '\u00B0'
""":class:`str`: The degree symbol."""

DEGREE_C = '\u2103'
""":class:`str`: The degree Centigrade symbol."""

DEGREE_F = '\u2109'
""":class:`str`: The degree Fahrenheit symbol."""


class GREEK(Enum):
"""Greek letters."""
Expand Down

0 comments on commit 93434e0

Please sign in to comment.