Trying to understand uos vs os

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Trying to understand uos vs os

Post by pythoncoder » Mon Apr 09, 2018 6:00 am

liudr wrote:
Sun Apr 08, 2018 3:41 pm
...No or hard-to-find well-documented exception handling, for instance, prevents developers from preparing programs for exceptions say from networking. Everything is assuming ideal situations in sample code, like that of Arduino. That will work for hours or even for days in reality but will break down when you think you've done a good job...
This is not my experience. Exception handling works. And with careful design long term running is no problem. I have an application which uses four pyboards communicating over radio links. The inherent unreliability of radio links means that it uses a considerable amount of exception handling. Aside from takedowns for updates it has been running for two years, with the last year's operation being entirely uninterrupted.
Peter Hinch
Index to my micropython libraries.

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: Trying to understand uos vs os

Post by liudr » Mon Apr 09, 2018 6:25 am

Where do I find some docs then? I want a list of exceptions generated by each module and what cause the exceptions.

For instance the network module:
https://docs.micropython.org/en/latest/ ... twork.html

I'd like to see what exception(s) the network.connect() might generate and I just couldn't find that information. Maybe I am not looking at the right place.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Trying to understand uos vs os

Post by dhylands » Mon Apr 09, 2018 4:51 pm

In order to import the non-u modules, you need to copy them onto your pi and make sure that sys.path points to the right place.

Post Reply