From 31459b2ddfba427991b421ce0a4e57f949ee4ba1 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Tue, 9 Feb 2021 18:50:40 +0000 Subject: [PATCH] Add __main__ to allow calling via python -m Allows e.g. ``` python -m jupytext my_notebook.ipynb --to Rmd ``` --- jupytext/__main__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 jupytext/__main__.py diff --git a/jupytext/__main__.py b/jupytext/__main__.py new file mode 100644 index 000000000..e3ce8d6be --- /dev/null +++ b/jupytext/__main__.py @@ -0,0 +1,13 @@ +""" Main for Jupytext + +Call with (e.g.):: + + python -m jupytext my_notebook.ipynb --to Rmd +""" + +import sys +from .cli import jupytext + + +if __name__ == '__main__': + sys.exit(jupytext(sys.argv[1:]))