Page 1 of 1

Command Reference

Posted: Fri Feb 28, 2014 9:28 pm
by schuschu
Is there some sort of reference of all currently implemented commands/functions? I was trying to execute a script from flash but can't seem to figure out how to do that (aside of main.py on startup).

Re: Command Reference

Posted: Sat Mar 01, 2014 4:40 pm
by dhylands
Not that I'm aware of.

Right now, the best thing to do is to look at the source. Look in stm/main.c and search for "add some functions" to get a list of custom functions available.

Other than that, I think that there are some examples in the exampless directory. I haven't tried them yet myself.

Re: Command Reference

Posted: Tue Mar 04, 2014 1:45 am
by pfalcon
There's indeed none, because the project is still in active development phase - it's just more productive to maintain just source than two of source and docs, both in flux.

The easiest way to see if something is supported is to build a "unix" version and try it in the comfort of your "desktop" system, whatever that means nowadays. Second good reference is the testsuite: https://github.com/micropython/micropyt ... sts/basics . It has small scripts for each feature/function implemented (or that's the aim). The source is ultimate reference, as Dave says.

Re: Command Reference

Posted: Tue Mar 04, 2014 10:19 am
by torwag
This comes along the lines, whether micropython should use something like doxygen or Epydoc etc.
It will encourage devs to write meaningful commands, docstrings, etc. and can be a task for non-programmers to help with.
Even if this auto-generated doc is very limited, it is better then no doc.

Re: Command Reference

Posted: Wed Mar 05, 2014 2:00 am
by pfalcon
Don't encourage devs - become one and submit patches ;-). Answering to specific suggestion, I don't see how doxygen and friends would help - they are for documenting *C* code. The approach I have in mind is that the documentation is at http://docs.python.org/3/ . We should just offer "differences" document, though level of detail of that is actually the main question. I wanted to start drafting some high-level doc like that for several weeks now, but still didn't get to it (having a chance to write a line, I prefer that line to be a code).

And besides that, there should be user-level docs and tutorials specific to PyBoard, and I'm sure that's next big task in Damien's queue, now that hopefully hardware production question is tackled. In the meantime, Kickstarter updates is the best reference for early adopter (that's at least how I now about stuff like boot.py/main.py , but as I work mostly on "unix" port, I'm not sure if more focused reference exists already).

Re: Command Reference

Posted: Wed Mar 05, 2014 9:42 am
by torwag
That is actually a very good idea.
We might can thing of a diff document structure which links to (or embed) the original doc and add a paragraph "Micropython:" to it. A semi-automatic system would allow to pull in new docs from python.org relatively easy just adding the micropython specific parts.

Tutorials and other stuff should start soon too. We are just in the middle to set-up the user wiki system.

BTW. Epydoc does for python what doxygen does for C.

And yes, if I find time I would love to splatter comments across code. We just would need to get an rule how those comments should look like.

Re: Command Reference

Posted: Sat Mar 22, 2014 10:19 pm
by pfalcon
Here's first cut at differences doc mentioned above: http://forum.micropython.org/viewtopic.php?f=3&t=50