util/misc.py
changeset 781 cdc6393705ce
parent 734 5c42cafaee15
child 806 abf1afc1f04d
equal deleted inserted replaced
780:70632f4612a1 781:cdc6393705ce
     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