From 4f86c17ebfa17d9e90f105c93a122c5b77c1e4d0 Mon Sep 17 00:00:00 2001 From: Robert Forkel <xrotwang@googlemail.com> Date: Wed, 5 May 2021 10:31:58 +0200 Subject: [PATCH] Update README.md --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4f6f695..96ff265 100644 --- a/README.md +++ b/README.md @@ -24,20 +24,20 @@ a `list` of `newick.Node` objects. ``` - Reading from a `file`-like object: -```python ->>> import io ->>> from newick import load ->>> with io.open('fname', encoding='utf8') as fp: -... trees = load(fp) -``` + ```python + >>> import io + >>> from newick import load + >>> with io.open('fname', encoding='utf8') as fp: + ... trees = load(fp) + ``` - Reading from a path: -```python ->>> from newick import read ->>> trees = read('fname') ->>> import pathlib ->>> trees = read(pathlib.Path('fname')) -``` + ```python + >>> from newick import read + >>> trees = read('fname') + >>> import pathlib + >>> trees = read(pathlib.Path('fname')) + ``` ### Supported Newick dialects @@ -93,7 +93,7 @@ A tree may be assembled using the factory methods of the `Node` class: ## Manipulating trees -- Diyplaying tree topology in the terminal: +- Displaying tree topology in the terminal: ```python >>> import newick >>> tree = newick.loads('(b,(c,(d,(e,(f,g))h)i)a)')[0] -- GitLab