comparison src/cagou/core/cagou_main.py @ 28:9f9532eb835f

core: added expand method to expand filename with magic values, specially useful in kv
author Goffi <goffi@goffi.org>
date Sun, 21 Aug 2016 15:02:18 +0200
parents d09bd16dbbe2
children 8b5827c43155
comparison
equal deleted inserted replaced
27:e77b616d3fae 28:9f9532eb835f
61 """Kivy App for Cagou""" 61 """Kivy App for Cagou"""
62 62
63 def build(self): 63 def build(self):
64 return CagouRootWidget([ProfileManager()]) 64 return CagouRootWidget([ProfileManager()])
65 65
66 def expand(self, path):
67 """expand path and replace known values
68
69 useful in kv. Values which can be used:
70 - {media}: media dir
71 """
72 return os.path.expanduser(path).format(media=self.host.media_dir)
73
66 74
67 class Cagou(QuickApp): 75 class Cagou(QuickApp):
68 MB_HANDLE = False 76 MB_HANDLE = False
69 77
70 def __init__(self): 78 def __init__(self):