help() not implemented in unix/windows builds

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
gcarver
Posts: 34
Joined: Sun Oct 26, 2014 4:07 am
Location: New Market, Maryland
Contact:

help() not implemented in unix/windows builds

Post by gcarver » Tue Nov 04, 2014 3:04 am

Is there a reason help() was not implemented in the Unix and Windows builds? I added it to my windows build and it seems to work OK.
End of line...

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: help() not implemented in unix/windows builds

Post by stijn » Tue Nov 04, 2014 8:30 am

Probably just an oversight?
Since you added it already, you could create a pull request to get it get merged into the master branch.

blmorris
Posts: 348
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: help() not implemented in unix/windows builds

Post by blmorris » Tue Nov 04, 2014 3:29 pm

I seem to recall that its omission from the unix build was deliberate, as not in keeping with the 'micro' philosophy. Perhaps it was seen to be more necessary for the pyboard, a sort of online 'Quick Start' for new users. Also, the specific details of the hardware API aren't a standard part of python and it isn't a given that the user will have source code or documentation readily at hand.
-Bryan

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: help() not implemented in unix/windows builds

Post by pfalcon » Tue Nov 04, 2014 6:02 pm

Yes, that's it (and it's a FAQ). If you want help(), just run python3 and get it. PyBoard implements it, because on PyBoard there's no other online reference to use, plus it offers extensions to Python stdlib for hardware access.

Alternatively, you can implement help() for MicroPython in Python code, make it a module, post on PyPI. Those few who need it will be able to install it from there. Note that it won't work too good so far, because of https://github.com/micropython/micropython/issues/959 . And that issue is really worth being solved, patches welcome!
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
gcarver
Posts: 34
Joined: Sun Oct 26, 2014 4:07 am
Location: New Market, Maryland
Contact:

Re: help() not implemented in unix/windows builds

Post by gcarver » Tue Nov 04, 2014 10:50 pm

Ok, I'll just keep the changes locally then because I like having the help, limited as it may be.
End of line...

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: help() not implemented in unix/windows builds

Post by pfalcon » Wed Nov 05, 2014 5:30 pm

Sounds good. Others can keep using dir() for that.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Post Reply