From e97851aecd0cb918149db1de38ffc3d78af59b64 Mon Sep 17 00:00:00 2001 From: Christian Eichenberger <christian.markus.eichenberger@sbb.ch> Date: Wed, 3 Jul 2019 15:29:41 +0000 Subject: [PATCH] Update FAQ.rst Sample usage did not render. --- docs/FAQ.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/FAQ.rst b/docs/FAQ.rst index 909fa2c1..5d9bb330 100644 --- a/docs/FAQ.rst +++ b/docs/FAQ.rst @@ -22,14 +22,20 @@ Frequently Asked Questions (FAQs) Sample usages: .. code-block:: python + from importlib_resources import path with path(package, resource) as file_in: new_grid = np.load(file_in) + + And: .. code-block:: python + from importlib_resources import read_binary + load_data = read_binary(package, resource) self.set_full_state_msg(load_data) + .. _importlib-resources: https://importlib-resources.readthedocs.io/en/latest/ -- GitLab