# eric6.Globals.__init__

Module defining common data to be used by all modules.

### Global Attributes

configDir
recentNameBreakpointConditions
recentNameBreakpointFiles
recentNameFiles
recentNameHexFiles
recentNameHosts
recentNameMultiProject
recentNameProject
settingsNameGlobal
settingsNameOrganization
settingsNameRecent

### Classes

None

### Functions

dataString | Module function to generate a formatted size string.
desktopName | Function to determine the name of the desktop environment used (Linux only).
getConfigDir | Module function to get the name of the directory storing the config data.
getPyQt5ModulesDirectory | Function to determine the path to PyQt5 modules directory.
getPyQtToolsPath | Module function to get the path of the PyQt tools.
getPythonModulesDirectory | Function to determine the path to Python's modules directory.
getQtBinariesPath | Module function to get the path of the Qt binaries.
getWebBrowserSupport | Module function to determine the supported web browser variant.
isGnomeDesktop | Function to check, if the current session is a Gnome desktop (Linux only).
isKdeDesktop | Function to check, if the current session is a KDE desktop (Linux only).
isLinuxPlatform | Function to check, if this is a Linux platform.
isMacPlatform | Function to check, if this is a Mac platform.
isWaylandSession | Function to check, if the current session is a wayland session.
isWindowsPlatform | Function to check, if this is a Windows platform.
qVersionTuple | Module function to get the Qt version as a tuple.
sessionType | Function to determine the name of the running session (Linux only).
setConfigDir | Module function to set the name of the directory storing the config data.
strGroup | Module function to group a string into sub-strings separated by a separator.
strToQByteArray | Module function to convert a Python string into a QByteArray.
toBool | Module function to convert a value to bool.
toByteArray | Module function to convert a value to a byte array.
toDict | Module function to convert a value to a dictionary.
toList | Module function to convert a value to a list.
translate | Module function to handle different PyQt 4/5 QCoreApplication.translate parameter.
versionToTuple | Module function to convert a version string into a tuple.

## dataString

dataString(size)

Module function to generate a formatted size string.

size (int)
  size to be formatted

Returns:
  formatted data string

Return Type:
  str

Up

## desktopName

desktopName()

Function to determine the name of the desktop environment used (Linux only).

Returns:
  name of the desktop environment

Return Type:
  str

Up

## getConfigDir

getConfigDir()

Module function to get the name of the directory storing the config data.

Returns:
  directory name of the config dir (string)

Up

## getPyQt5ModulesDirectory

getPyQt5ModulesDirectory()

Function to determine the path to PyQt5 modules directory.

Returns:
  path to the PyQt5 modules directory (string)

Up

## getPyQtToolsPath

getPyQtToolsPath(version=5)

Module function to get the path of the PyQt tools.

version (int)
  PyQt major version

Returns:
  path to the PyQt tools

Return Type:
  str

Up

## getPythonModulesDirectory

getPythonModulesDirectory()

Function to determine the path to Python's modules directory.

Returns:
  path to the Python modules directory (string)

Up

## getQtBinariesPath

getQtBinariesPath()

Module function to get the path of the Qt binaries.

Returns:
  path of the Qt binaries (string)

Up

## getWebBrowserSupport

getWebBrowserSupport()

Module function to determine the supported web browser variant.

Returns:
  string indicating the supported web browser variant ("QtWebEngine", or "None")

Return Type:
  str

Up

## isGnomeDesktop

isGnomeDesktop()

Function to check, if the current session is a Gnome desktop (Linux only).

Returns:
  flag indicating a Gnome desktop

Return Type:
  bool

Up

## isKdeDesktop

isKdeDesktop()

Function to check, if the current session is a KDE desktop (Linux only).

Returns:
  flag indicating a KDE desktop

Return Type:
  bool

Up

## isLinuxPlatform

isLinuxPlatform()

Function to check, if this is a Linux platform.

Returns:
  flag indicating Linux platform (boolean)

Up

## isMacPlatform

isMacPlatform()

Function to check, if this is a Mac platform.

Returns:
  flag indicating Mac platform (boolean)

Up

## isWaylandSession

isWaylandSession()

Function to check, if the current session is a wayland session.

Returns:
  flag indicating a wayland session

Return Type:
  bool

Up

## isWindowsPlatform

isWindowsPlatform()

Function to check, if this is a Windows platform.

Returns:
  flag indicating Windows platform (boolean)

Up

## qVersionTuple

qVersionTuple()

Module function to get the Qt version as a tuple.

Returns:
  Qt version as a tuple

Return Type:
  tuple of int

Up

## sessionType

sessionType()

Function to determine the name of the running session (Linux only).

Returns:
  name of the desktop environment

Return Type:
  str

Up

## setConfigDir

setConfigDir(d)

Module function to set the name of the directory storing the config data.

d
  name of an existing directory (string)

Up

## strGroup

strGroup(txt, sep, groupLen=4)

Module function to group a string into sub-strings separated by a separator.

txt (str)
  text to be grouped
sep (str)
  separator string
groupLen (int)
  length of each group

Returns:
  result string

Return Type:
  str

Up

## strToQByteArray

strToQByteArray(txt)

Module function to convert a Python string into a QByteArray.

txt (str, bytes, bytearray, unicode)
  Python string to be converted

Returns:
  converted QByteArray

Return Type:
  QByteArray

Up

## toBool

toBool(value)

Module function to convert a value to bool.

value
  value to be converted

Returns:
  converted data

Up

## toByteArray

toByteArray(value)

Module function to convert a value to a byte array.

value
  value to be converted

Returns:
  converted data

Up

## toDict

toDict(value)

Module function to convert a value to a dictionary.

value
  value to be converted

Returns:
  converted data

Up

## toList

toList(value)

Module function to convert a value to a list.

value
  value to be converted

Returns:
  converted data

Up

## translate

translate(*args)

Module function to handle different PyQt 4/5 QCoreApplication.translate parameter.

args
  tuple of arguments from QCoreApplication.translate (tuple)

Returns:
  translated string (string)

Up

## versionToTuple

versionToTuple(version)

Module function to convert a version string into a tuple.

Note: A version string consists of non-negative decimals separated by "." optionally followed by a suffix. Suffix is everything after the last decimal.

version (str)
  version string

Returns:
  version tuple without the suffix

Return Type:
  tuple of int

Up