util/misc.py
changeset 787 f49875b9e946
parent 781 cdc6393705ce
child 806 abf1afc1f04d
equal deleted inserted replaced
779:7499535588e6 787:f49875b9e946
     1 """
     1 """
     2 Misc definitions
     2 Misc definitions
     3 """
     3 """
     4 
     4 
     5 import os,sys
     5 import os,sys
     6 
       
     7 # helper func to get path to images
       
     8 def opjimg(imgname):
       
     9     return os.path.join(sys.path[0], "images", imgname+".png")
       
    10     
     6     
    11 # helper func to check path write permission
     7 # helper func to check path write permission
    12 def CheckPathPerm(path):
     8 def CheckPathPerm(path):
    13     if path is None or not os.path.isdir(path):
     9     if path is None or not os.path.isdir(path):
    14         return False
    10         return False