Search found 462 matches

by stijn
Fri Jun 19, 2020 11:32 am
Forum: Pyboard D-series
Topic: Max number of files to iterate with os.listdir()
Replies: 10
Views: 334

Re: Max number of files to iterate with os.listdir()

Would help if you explain your goal. Do you really need os.listdir()? As far as I know that returns a list so you need the memory to store all names. But if you do not need that list as a whole, which is not unlikely, you could use ilistdir() instead: that gives you an iterator so you can access eac...
by stijn
Thu Jun 18, 2020 7:38 pm
Forum: Development of MicroPython
Topic: tranformation MP_QSTR__slash_lib into /lib
Replies: 6
Views: 591

Re: tranformation MP_QSTR__slash_lib into /lib

Is there a way to reproduce this? I.e. what port and/or custom build are you using?
by stijn
Mon Jun 15, 2020 10:05 am
Forum: ESP32 boards
Topic: How to JSON
Replies: 5
Views: 184

Re: How to JSON

by stijn
Sat Jun 13, 2020 12:45 pm
Forum: ESP32 boards
Topic: How to JSON
Replies: 5
Views: 184

Re: How to JSON

I think you're looking for json.dump to write values to a file: https://docs.python.org/3/library/json.html Also if you have a series of values it might be more interesting to use a dict/list instead of all individual values, like values = json.loads('{"aa": ["someValue", " ", " "], "bb": [" ", " ",...
by stijn
Fri Jun 12, 2020 2:55 pm
Forum: General Discussion and Questions
Topic: Minimal python install for thonny ide
Replies: 10
Views: 277

Re: Minimal python install for thonny ide

DanielRossinsky wrote:
Fri Jun 12, 2020 2:19 pm
trying to find are exactly the custom options they chose before
That's really something for Thonny's github issue tracker then, if that's the only way to get in touch with them, and pretty much out of scope for a MicroPython forum.
by stijn
Fri Jun 12, 2020 1:39 pm
Forum: General Discussion and Questions
Topic: Minimal python install for thonny ide
Replies: 10
Views: 277

Re: Minimal python install for thonny ide

Ok makes sense now. Looks like that's not going to work; if this is what I think it is: https://github.com/thonny/thonny/blob/master/packaging/windows/create_installer.bat then they don't use an installer and hence no switches, instead the build machine is required to have Python installed, when bui...
by stijn
Fri Jun 12, 2020 8:21 am
Forum: General Discussion and Questions
Topic: Minimal python install for thonny ide
Replies: 10
Views: 277

Re: Minimal python install for thonny ide

Sorry, I have only briefly used Thonny, so I just don't understand what you are trying to do. Can you maybe clarify: you mention 3 different types of Python: MicroPython, Python 3.8.3 and 'bundeled Python'. MicroPython has no installer so that should not be an issue? As for 'bundeled': what does tha...
by stijn
Fri Jun 12, 2020 6:29 am
Forum: General Discussion and Questions
Topic: Minimal python install for thonny ide
Replies: 10
Views: 277

Re: Minimal python install for thonny ide

I don't fully undesrtand the question - the Thonny pip package is just a bunch of Python files. Can't you first install Python (personally I always use Miniconda3, create an environment in it using Python 3.8.3, all silent), then 'pip install Thonny'? In any case: posting an issue on Thonny's github...
by stijn
Wed May 20, 2020 7:36 pm
Forum: Programs, Libraries and Tools
Topic: How to Build and Debug MicroPython Source Code with Eclipse
Replies: 10
Views: 1150

Re: How to Build and Debug MicroPython Source Code with Eclipse

You don't have to change any source code, as shown you can specify the path to the python executable on the make commandline. And I'd really advise to do that, or even any other solution (like adding Python directory to PATH), as long as it's not putting things in system32. Unless you are really luc...
by stijn
Wed May 20, 2020 1:07 pm
Forum: Programs, Libraries and Tools
Topic: How to Build and Debug MicroPython Source Code with Eclipse
Replies: 10
Views: 1150

Re: How to Build and Debug MicroPython Source Code with Eclipse

10:51:53 **** Build of configuration Default for project micropython **** make -C ports/stm32 V=1 BOARD=STM32F7DISC make: Entering directory 'G:/microPython/project/micropython/ports/stm32' GEN build-STM32F7DISC/genhdr/pins.h python3 boards/make-pins.py --board boards/STM32F7DISC/pins.csv --af boar...