Replies: 1 comment 3 replies
-
In most cases help isn't really enabled / used in micropython as the text takes up quite a lot of flash space (relative to bytecode). I think in particular it doesn't even exist for functions (as you've found) but can be enabled as a build option for modules. The official micropython docs are
Currently though micropython-lib modules have notes in matching readme at best, maybe some example scripts. I usually just put some details in a readme (or often nothing at all ... ) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I realized in normal python, I can add a docstring at the beginning of a function, and when the user types help(my_function), the docstring will show up, so I can explain what the function does and what the parameters represent. But this doesn't work on mpy, it only shows the type and address/id of the object in question.
I'm new to writing shareable open source, and have no idea in general how people best provide documentation for their projects. Usually fancy projects provide their own website, and simple ones use readme.md in github. I know there is readthedocs for usual python packages, and theoretically it can be used for micropython, but are there other ways? Which is the best and how to do it? The easiest for me would be somehow exposing docstrings to the user, such that the user types help(module_name) and gets everything they need to know shown there. Maybe there can even be a script that converts that to html or md files that I can then upload to github?
Beta Was this translation helpful? Give feedback.
All reactions