parameter_name to assert_type_or_raise.lcut and rcut, fixed split_in_parts.FILE_URL_REGEX, the full match included a whitespace at the end. Also made the protocol http(s):// optional.SIMPLE_URL_REGEX, to cheaply match github urls.luckydonaldUtils.interactions to see if a string is True or False
def string_is_yes(...): checks for a true-ish value and return False otherwisedef string_y_n(...): expects y/n (case insensitive)def assert_or_raise(...) to def assert_type_or_raise(...) in luckydonaldUtils.exceptions (the old name as an alias to keep backwards compatibility, but it will warn you every time)From Bonbot:
def cut_paragraphs(...): cut text down to a specified lenght.Logger update:
def add_colored_handler(...): added filter parameter. It will be applied to the handler.def test_logger_levels(...):
name parameter to test with a name other then that function.force_all_levels parameter to test with setting the logger to DEBUG level first.def getLoglevelInt(...): Now allows you to input numbers, too (both as str or as int).def getLoglevelInt(...): Now allows you to input numbers, too (both as str or as int).class LevelByNameFilter: You can specify the names and set levels of files you want to log.@cached decorator, to work with non jsonable cases, like theself attribute in classes. Should be more reliable overall.@cached(max_age=None) decorator..decorators importtree, and dependencies.text.split_in_parts(string, parts, strict=False): Splits a string in given parts pieces.files.py into a cleaner structured module.
files.basics
mkdir_popen_folderopen_file_folderfiles.mime
guess_extensionget_file_mimeget_byte_mimeget_file_suffixfiles.name
do_a_filenamefiles.temp
gettempdirfiles.tree.tree(directory, padding="", print_files=False, level=-1, print_it=True). It comes executable from command line. Just call python -m luckydonaldUtils.files.treefunctions.deprecated to now also accept a message:
dependencies-full.txt file, listing all dependencies which might be needed. Should now be a complete list. 0.46luckydonaldUtils.exceptions.assert_or_raise(...)No changelog was made. Either look into the commit history, or have a look at the README.md, it comes with version information too.