util/misc.py
changeset 1853 47a3f39bead0
parent 1850 614396cbffbf
child 1862 c4ba411f8c89
equal deleted inserted replaced
1852:70c1cc354a8f 1853:47a3f39bead0
    24 
    24 
    25 """
    25 """
    26 Misc definitions
    26 Misc definitions
    27 """
    27 """
    28 
    28 
       
    29 
       
    30 from __future__ import absolute_import
    29 import os
    31 import os
       
    32 
       
    33 from util.BitmapLibrary import AddBitmapFolder
       
    34 from util.TranslationCatalogs import AddCatalog
    30 
    35 
    31 
    36 
    32 def CheckPathPerm(path):
    37 def CheckPathPerm(path):
    33     """ Helper func to check path write permission """
    38     """ Helper func to check path write permission """
    34     if path is None or not os.path.isdir(path):
    39     if path is None or not os.path.isdir(path):
    51     else:
    56     else:
    52         return classpath
    57         return classpath
    53 
    58 
    54 
    59 
    55 def InstallLocalRessources(CWD):
    60 def InstallLocalRessources(CWD):
    56     from BitmapLibrary import AddBitmapFolder
       
    57     from TranslationCatalogs import AddCatalog
       
    58 
       
    59     # Beremiz bitmaps
    61     # Beremiz bitmaps
    60     AddBitmapFolder(os.path.join(CWD, "images"))
    62     AddBitmapFolder(os.path.join(CWD, "images"))
    61 
    63 
    62     # Internationalization
    64     # Internationalization
    63     AddCatalog(os.path.join(CWD, "locale"))
    65     AddCatalog(os.path.join(CWD, "locale"))