eric7.Globals.__init__

Module defining common data to be used by all modules.

Global Attributes

configDir
recentNameBreakpointConditions
recentNameBreakpointFiles
recentNameFiles
recentNameHexFiles
recentNameHosts
recentNameMultiProject
recentNameProject
recentNameTestDiscoverHistory
recentNameTestEnvironment
recentNameTestFileHistory
recentNameTestFramework
recentNameTestNameHistory
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.
getInstallInfoFilePath Public method to get the path name of the install info file.
getPyQt6ModulesDirectory Function to determine the path to PyQt6 modules directory.
getPyQtToolsPath Module function to get the path of the PyQt tools.
getPythonExecutable Function to determine the path of the (non-windowed) Python executable.
getPythonLibraryDirectory Function to determine the path to Python's library 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.
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
Return:
formatted data string
Return Type:
str
Up


desktopName

desktopName()

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

Return:
name of the desktop environment
Return Type:
str
Up


getConfigDir

getConfigDir()

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

Return:
directory name of the config dir
Return Type:
str
Up


getInstallInfoFilePath

getInstallInfoFilePath()

Public method to get the path name of the install info file.

Return:
file path of the install info file
Return Type:
str
Up


getPyQt6ModulesDirectory

getPyQt6ModulesDirectory()

Function to determine the path to PyQt6 modules directory.

Return:
path to the PyQt6 modules directory
Return Type:
str
Up


getPyQtToolsPath

getPyQtToolsPath(version=5)

Module function to get the path of the PyQt tools.

version (int)
PyQt major version
Return:
path to the PyQt tools
Return Type:
str
Up


getPythonExecutable

getPythonExecutable()

Function to determine the path of the (non-windowed) Python executable.

Return:
path of the Python executable
Return Type:
str
Up


getPythonLibraryDirectory

getPythonLibraryDirectory()

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

Return:
path to the Python library directory
Return Type:
str
Up


getQtBinariesPath

getQtBinariesPath(libexec=False)

Module function to get the path of the Qt binaries.

libexec (bool (optional))
flag indicating to get the path of the executable library (defaults to False)
Return:
path of the Qt binaries
Return Type:
str
Up


getWebBrowserSupport

getWebBrowserSupport()

Module function to determine the supported web browser variant.

Return:
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).

Return:
flag indicating a Gnome desktop
Return Type:
bool
Up


isKdeDesktop

isKdeDesktop()

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

Return:
flag indicating a KDE desktop
Return Type:
bool
Up


isLinuxPlatform

isLinuxPlatform()

Function to check, if this is a Linux platform.

Return:
flag indicating Linux platform
Return Type:
bool
Up


isMacPlatform

isMacPlatform()

Function to check, if this is a Mac platform.

Return:
flag indicating Mac platform
Return Type:
bool
Up


isWaylandSession

isWaylandSession()

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

Return:
flag indicating a wayland session
Return Type:
bool
Up


isWindowsPlatform

isWindowsPlatform()

Function to check, if this is a Windows platform.

Return:
flag indicating Windows platform
Return Type:
bool
Up


qVersionTuple

qVersionTuple()

Module function to get the Qt version as a tuple.

Return:
Qt version as a tuple
Return Type:
tuple of int
Up


sessionType

sessionType()

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

Return:
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 (str)
name of an existing directory
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
Return:
result string
Return Type:
str
Up


strToQByteArray

strToQByteArray(txt)

Module function to convert a Python string into a QByteArray.

txt (str, bytes, bytearray)
Python string to be converted
Return:
converted QByteArray
Return Type:
QByteArray
Up


toBool

toBool(value)

Module function to convert a value to bool.

value (str)
value to be converted
Return:
converted data
Return Type:
bool
Up


toByteArray

toByteArray(value)

Module function to convert a value to a byte array.

value (QByteArray or None)
value to be converted
Return:
converted data
Return Type:
QByteArray
Up


toDict

toDict(value)

Module function to convert a value to a dictionary.

value (dict or None)
value to be converted
Return:
converted data
Return Type:
dict
Up


toList

toList(value)

Module function to convert a value to a list.

value (None, list or Any)
value to be converted
Return:
converted data
Return Type:
list
Up


versionToTuple

versionToTuple(version, length=3)

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
length (int)
desired length of the version tuple
Return:
version tuple without the suffix
Return Type:
tuple of int
Up