'Return a list of strings in a given file'

def get_strings_by_file(self, filename):

    if os.path.isfile(filename):
        filename = os.path.abspath(filename)
    else:
        print ("'%s'    is    not    a    valid    file    path!" % filename)
        return []
    R = TranslateReadFiles()
    strings = []
    sappend = strings.append
    tmpstr = []
    if (filename.endswith('.py') == True):
        tmpstr = R.findstr(filename, 'ALL', self.grp.modlist)
    elif ((filename.endswith('.html') == True) or (filename.endswith('.js') == True)):
        tmpstr = R.read_html_js(filename)
    else:
        print "Please    enter    a    '.py',    '.js'    or    '.html'    file    path"
        return []
    for s in tmpstr:
        sappend((('%s:%s' % (filename, str(s[0]))), s[1]))
    return strings
