fluiddyn.util.util

Toolkit (fluiddyn.util.util)

Functions

config_logging([level, name, file, color])

Configure a logging with a particular level and output file.

copy_me_in([dest])

Copy the file from where this function is called.

create_object_from_file(str_path, *args, ...)

Create an object from a file.

get_memory_usage()

Return the memory usage in Mo.

get_pathfile_from_strpath(str_path[, ext])

Get the path of a file with a particular extension from a string.

has_to_be_made(path_out, sources[, source_dir])

Check if a file has to be (re)produce from its sources

import_class(module_name, class_name)

Import a class from its name.

ipydebug()

Launch an Ipython shell

is_run_from_ipython()

Check whether the code is run from Ipython.

is_run_from_jupyter()

Check whether the code is run from Jupyter.

modification_date(path)

Modification date of a file or directory

print_memory_usage(string)

Print the memory usage.

print_options(*args, **kwargs)

Set print option

print_size_in_Mo(arr[, string])

Print the size of an array.

run_from_ipython()

setenv(**env)

Temporarily set environment variables inside the context manager and fully restore previous environment afterwards.

time_as_str([decimal])

Return a string coding the time.

Classes

Params()

Minimalist object to store some parameters.