pycoretools.concurrency
- class pycoretools.concurrency.MyProcessPool(processes, initializer=None, initargs=(), start_method='fork')
- class pycoretools.concurrency.MyThreadPool(processes=1, initializer=None, initargs=None)
- class pycoretools.concurrency.NoDaemonProcessPool(processes=None, initializer=None, initargs=(), maxtasksperchild=None, context=None)
- class pycoretools.concurrency.Progress(maximum, UseParallelisation, Cores)
- decrement()
- increment()
- write()
- pycoretools.concurrency.default_cores()
- class pycoretools.concurrency.fakeValue(type_, init_value)
- pycoretools.concurrency.filterThreads(lambda_func, iterable)
- pycoretools.concurrency.mapThreads(func, *args, **kwargs)
- pycoretools.concurrency.progress_wrapper(func, *args, **kwargs)
- pycoretools.concurrency.worker(x)
pycoretools.context
- class pycoretools.context.TemporarySetting(module_or_module_name, setting_name, new_value)
pycoretools.decorators
- pycoretools.decorators.retry(ExceptionsToCheck, max_tries=2, silent=False)
- pycoretools.decorators.with_cm(cm)
A decorator that applies a context manager to the function. This allows a with statement to be used as a decorator.
pycoretools.iterables
- pycoretools.iterables.all_non_empty_subsets(iterable)
- pycoretools.iterables.chunks(l, n)
Yield successive n-sized chunks from l.
- pycoretools.iterables.crease(iterable, template, depth, called_recursively=False, verbose=False)
Inverse function to flatten. Requires a template to define the shape. Rugged shape is supported.
- pycoretools.iterables.flatten(temp_list, recursion_level: int = 0, treat_list_subclasses_as_list: bool = True, treat_tuples_as_lists: bool = False, max_recursion=None)
pycoretools.sentinels
- class pycoretools.sentinels.NotAnInteger(*args, **kwargs)
- class pycoretools.sentinels.Singleton(*args, **kwargs)
Module contents
- class pycoretools.TemporarySetting(module_or_module_name, setting_name, new_value)
- pycoretools.all_non_empty_subsets(iterable)
- pycoretools.chunks(l, n)
Yield successive n-sized chunks from l.
- pycoretools.crease(iterable, template, depth, called_recursively=False, verbose=False)
Inverse function to flatten. Requires a template to define the shape. Rugged shape is supported.
- pycoretools.default_cores()
- pycoretools.filterThreads(lambda_func, iterable)
- pycoretools.flatten(temp_list, recursion_level: int = 0, treat_list_subclasses_as_list: bool = True, treat_tuples_as_lists: bool = False, max_recursion=None)
- pycoretools.mapThreads(func, *args, **kwargs)
- pycoretools.retry(ExceptionsToCheck, max_tries=2, silent=False)
- pycoretools.with_cm(cm)
A decorator that applies a context manager to the function. This allows a with statement to be used as a decorator.