Search found 54 matches
- Sat Sep 07, 2019 8:43 am
- Forum: Development of MicroPython
- Topic: C module programming reference
- Replies: 19
- Views: 11614
- Wed May 01, 2019 5:41 am
- Forum: Programs, Libraries and Tools
- Topic: RFD77402
- Replies: 3
- Views: 2773
Re: RFD77402
I also personally also like to follow some parts of Circuit Python design guide. Especially the naming the sensor properties and units part.
- Wed Apr 17, 2019 1:38 pm
- Forum: General Discussion and Questions
- Topic: Extend System Module By Subclassing
- Replies: 8
- Views: 5814
Re: Extend System Module By Subclassing
Tested with real device and works for me with ESP32. Note that __getattr__ is called only when accessing an undefined attribute. Here is a bit cleaned up code: import network class wlan: def __init__(self, mode): self._station = network.WLAN(mode) self._station.active(True) def __getattr__(self, nam...
- Wed Apr 17, 2019 7:57 am
- Forum: General Discussion and Questions
- Topic: Extend System Module By Subclassing
- Replies: 8
- Views: 5814
Re: Extend a Module By Subclassing
Hmm. interesting was not aware of the composition approach, but I guess that custom() will not contain all of the original methods and variables from WLAN() in your example, and that I would need to redefine / link them all if required ? You can use __getattr__ magic. It should work for both attrib...
- Tue Apr 16, 2019 1:33 pm
- Forum: General Discussion and Questions
- Topic: Extend System Module By Subclassing
- Replies: 8
- Views: 5814
Re: Extend a Module By Subclassing
You could use composition instead of inheritance. Personally I always prefer composition. class wlan: def __init__(self, station): self._station = station def scan(self): print('replace original scanning method') return self._station.scan() def xscan(self): print('new scan method using sub method') ...
- Sun Apr 14, 2019 6:53 am
- Forum: ESP32 boards
- Topic: Integrating Loboris port back to official uP ESP32 port
- Replies: 33
- Views: 27858
Re: Integrating Loboris port back to official uP ESP32 port
This sounds interesting. Is there any more information about c-file support somehere?kevinkk525 wrote: ↑Wed Apr 10, 2019 10:32 amI agree, the display module would be perfect for a standalone module with the upcoming c-file support.
- Sun Apr 14, 2019 6:52 am
- Forum: ESP32 boards
- Topic: Integrating Loboris port back to official uP ESP32 port
- Replies: 33
- Views: 27858
Re: Integrating Loboris port back to official uP ESP32 port
FWIW I use Loboris fork for my M5Stack based projects and I love it. However most of the new features, like the display module IMO do not belong to Micropython core. Core should stay lean. They should be able to easily be added to custom build though. The main reason for me to use Loboris fork was p...
- Sun Apr 14, 2019 5:04 am
- Forum: General Discussion and Questions
- Topic: Other Micropython forums
- Replies: 3
- Views: 2845
Re: Other Micropython forums
Maybe not high traffic, but this forum has a good signal to noise ratio.
- Wed Mar 28, 2018 3:16 pm
- Forum: General Discussion and Questions
- Topic: Frozen modules and search order
- Replies: 7
- Views: 7924
- Fri Mar 02, 2018 10:48 am
- Forum: General Discussion and Questions
- Topic: Frozen modules and search order
- Replies: 7
- Views: 7924
Frozen modules and search order
Do i understand correctly frozen modules are always the first in the search order when doing an import? For example let's assume I have a frozen module called foo. I made some changes to it and would like to test the changes so I upload foo.py to the flash. However when I do import foo it always see...