mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Allow mystmd to parse Python files with MyST content

Open saulshanabrook opened this issue 2 months ago • 2 comments

Hello!

I was wondering if it's possible to have Python files as input, like you can with jupytext. There are pros and cons of writing things in .py files, compared to .ipynb and .md files. A few reasons why you might want this are better compatibility with existing editors for source code analysis and refactoring, as well as the ability to easily "import" the code from the documentation without needing any transformation.

For example, there is a Numba "book" on their version two compiler, implemented by running jupytext over Python files:

  • https://numba.pydata.org/numba-prototypes/sealir_tutorials/index.html
  • https://github.com/numba/numba-prototypes/blob/main/sealir-tutorials/Makefile
  • https://github.com/numba/numba-prototypes/blob/main/sealir-tutorials/ch01_basic_compiler.py

Would it be possible to use mystmd to build this kind of project?

saulshanabrook avatar Sep 11 '25 00:09 saulshanabrook