def fetch_snippets_from_dir(path):
 rv = []
 for filename in glob.glob(os.path.join(path, '*.tmSnippet')):
  print ('Reading file %s' % filename)
  f = open(filename)
  content = f.read()
  cont = parse_content(content)
  if cont:
   name = os.path.splitext(os.path.basename(filename))[0]
   rv.append((name, cont))
 return rv

def fetch_snippets_from_dir ( path ) : rv = [ ] for filename in glob . glob ( os . path . join ( path , '*.tmSnippet' ) ) : print ( 'Reading file %s' % filename ) f = open ( filename ) content = f . read ( ) cont = parse_content ( content ) if cont : name = os . path . splitext ( os . path . basename ( filename ) ) [ 0 ] rv . append ( ( name , cont ) ) return rv
fetch snippets from a given path .