Exemple #1
0
 def __init__(self, js, onload=True):
     if os.path.isfile(js):
         js = File(js)
     if isinstsafe(js, File):
         if js.ext == 'coffee':
             js = js.coffee2js()
         js = js.read()
     self._raw = js
     self._onload = onload
Exemple #2
0
 def inTags(fd):
     tagFile = File(fd['dataFile']).resrepext(FigData.TAG_EXT)
     if not tagFile: return False
     return filter in [s.lower() for s in json.loads(
         tagFile.read()
     )]