refactoring - app.py, files moved to different folders

This commit is contained in:
ingvar1995 2018-04-17 15:14:05 +03:00
parent 91d3f885c0
commit 8a2665ed4d
26 changed files with 287 additions and 302 deletions

View file

@ -0,0 +1,18 @@
import os
import util.util as util
def load_stickers():
"""
:return list of stickers
"""
result = []
d = util.get_stickers_directory()
keys = [x[1] for x in os.walk(d)][0]
for key in keys:
path = d + key + '/'
files = filter(lambda f: f.endswith('.png'), os.listdir(path))
files = map(lambda f: str(path + f), files)
result.extend(files)
return result