News for hackers. Stuff that matters.
Re:Cog: Use Python in your source files to generate pieces o... by devsda on Wednesday December 13, 2023 @02:52AM (#38623968)
This approach is sometimes referred to as literate programming.

Emacs's org-babel package implements it for a variety of languages but only within org-mode files (.org).

You might be able to find a 3rd party package/script that works for you or you might find it easy to write/modify existing scripts depending on your particular use case.

There are no comments on this comment yet.