(relative_path)
get path to resource
get path to resource
get path to resource
def resource_path(relative_path):
    """get path to resource
    """
    res_path = None
    base_path = getattr(sys, '_MEIPASS', os.path.dirname(
        os.path.abspath(__file__)))
    # its /lib/ now so move one up os.pardir
    if hasattr(sys, '_MEIPASS'):
        res_path = os.path.join(base_path, relative_path)
    else:
        res_path = os.path.join(base_path, os.pardir, relative_path)

    if res_path and os.path.exists(res_path):
        return res_path
    else:
        return ':' + relative_path
def resource_path ( relative_path ) : res_path = None base_path = getattr ( sys , '_MEIPASS' , os . path . dirname ( os . path . abspath ( __file__ ) ) ) # its /lib/ now so move one up os.pardir if hasattr ( sys , '_MEIPASS' ) : res_path = os . path . join ( base_path , relative_path ) else : res_path = os . path . join ( base_path , os . pardir , relative_path ) if res_path and os . path . exists ( res_path ) : return res_path else : return ':' + relative_path