From f9e26e1c23629043b2e1ab99c90126452a8fc0bd Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 30 Sep 2018 19:37:00 -0500 Subject: [PATCH] Plug in settings for threading --- resources/lib/helper/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/lib/helper/utils.py b/resources/lib/helper/utils.py index 4f81ecde..56a8216c 100644 --- a/resources/lib/helper/utils.py +++ b/resources/lib/helper/utils.py @@ -403,3 +403,7 @@ def normalize_string(text): text = unicodedata.normalize('NFKD', unicode(text, 'utf-8')).encode('ascii', 'ignore') return text + +def split_list(itemlist, size): + # Split up list in pieces of size. Will generate a list of lists + return [itemlist[i:i+size] for i in range(0, len(itemlist), size)]