You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13 lines
368 B

# -*- coding: utf-8 -*-
# This file is under GNU Affero General Public License 3.0
# see LICENSE.txt
from . import constants
import pathlib
def data_file_contents(name) -> str:
"""grab the contents of a file in the data folder"""
path = pathlib.Path(__file__).parent / constants.DATADIR / name
with path.open(mode='r') as fid:
return fid.read()