jupyter_analysis_tools.utils

Functions

addEnvScriptsToPATH()

Prepends the Scripts directory of the current Python environment base directory to systems PATH variable.

appendToPATH(parentPath[, subdirs, verbose])

Adds the given path with each subdirectory to the PATH environment variable.

checkWinFor7z()

Extend the PATH environment variable for access to the 7-zip executable.

extract7z(fn[, workdir])

fmtErr(val, std[, precision, width])

Formats a given value and its stdandard deviation to physics notation, e.g. '1.23(4)'.

grouper(iterable, n[, fillvalue])

Returns an iterator over a list of tuples (grouping) for a given flat iterable.

isLinux()

isList(obj)

Return true if the provided object is list-like including a numpy array but not a string.

isMac()

isWindows()

makeNetworkdriveAbsolute(filepath[, ...])

Replaces the drive letter of the given path by the respective network path, if possible.

naturalKey(name)

Split string into list of strings and integers.

networkdriveMapping([cmdOutput, resolveNames])

Returns a dict of mapping drive letters to network paths (on Windows).

pushd(new_dir)

setLocaleUTF8()

Fix the Jupyter locale which is not UTF-8 by default on Windows.

setPackage(globalsdict)

Sets the current directory of the notebook as python package to make relative module imports work.

shortenWinPath(path)

updatedDict(d, key, value)

Implements the |= operator for dict in Python version <3.9.