Skip to content

Commit

Permalink
Add __main__ to allow calling via python -m
Browse files Browse the repository at this point in the history
Allows e.g.

```
python -m jupytext my_notebook.ipynb --to Rmd
```
  • Loading branch information
matthew-brett committed Feb 9, 2021
1 parent 6abaea0 commit 5fdf100
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions jupytext/__main__.py
Original file line number Diff line number Diff line change
@@ -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:]))

0 comments on commit 5fdf100

Please sign in to comment.