Search found 22 matches
- Tue Nov 28, 2017 5:29 pm
- Forum: General Discussion and Questions
- Topic: How to get the file size
- Replies: 3
- Views: 3503
- Tue Nov 28, 2017 8:03 am
- Forum: General Discussion and Questions
- Topic: How to get the file size
- Replies: 3
- Views: 3503
How to get the file size
Does MicroPython have a method to obtain the size of a file like os.path.getsize(filename)?
- Sat Nov 18, 2017 6:16 pm
- Forum: ESP8266 boards
- Topic: Fragment identifier
- Replies: 3
- Views: 3167
Re: Fragment identifier
@SpotlightKid, I'm not using any framework. I just wrote my own WSGI using the MicroPython API. I request the image by polling it from the browser via JavaScript.
@deshipu, thank you for the clarification. That makes sense now.
@deshipu, thank you for the clarification. That makes sense now.
- Sat Nov 18, 2017 8:21 am
- Forum: ESP8266 boards
- Topic: Fragment identifier
- Replies: 3
- Views: 3167
Fragment identifier
Does MicroPython support URLs with fragment identifiers? https://en.wikipedia.org/wiki/Fragment_identifier I'm writing a small web server that polls a JPEG image that constantly changes (e.g.. like a live webcam feed). It's currently working by adding an unique cache-busting query parameter to the U...
- Sat Nov 04, 2017 4:17 am
- Forum: General Discussion and Questions
- Topic: Benchmark comparison of MicroPython boards
- Replies: 18
- Views: 29995
Re: Benchmark comparison of MicroPython boards
Sorry for reviving this old thread, but I was wondering where does the OpenMV M7 board rank within this list?
https://openmv.io/
https://openmv.io/
- Tue Oct 31, 2017 6:13 am
- Forum: ESP8266 boards
- Topic: ure - regular expressions api
- Replies: 4
- Views: 3845
Re: ure - regular expressions api
Hi Peter, I'm well aware that MicroPython does not support the entire python standard library. However, it will be great if the core team can consider extending the basic grouping syntax to add named-groups. It's a very helpful feature for parsing dynamic URIs/URLs containing named gapturing groups....
- Mon Oct 30, 2017 7:41 am
- Forum: ESP8266 boards
- Topic: ure - regular expressions api
- Replies: 4
- Views: 3845
Re: ure - regular expressions api
I was able to make it work without sub() and groupdict(). However, I cannot figure out why this generates ValueError: Error in regex, but it run perfectly fine with standard Python re api.
Code: Select all
import ure
ure.compile('^{}$'.format('/cam/(?P<epoch>.+)'))
- Sun Oct 29, 2017 1:29 am
- Forum: ESP8266 boards
- Topic: ure - regular expressions api
- Replies: 4
- Views: 3845
ure - regular expressions api
Why doesn't ure have the ure.sub() or match.groupdict() functions? Is there a workaround for that in the MicroPython?
- Sat Oct 28, 2017 3:35 am
- Forum: ESP8266 boards
- Topic: Converting UTC in utime.localtime giving wrong date
- Replies: 5
- Views: 9374
Re: Converting UTC in utime.localtime giving wrong date
@The Royal We and @dhylands, thank you both for posting this information. It helped me a lot. I have just one question. "The Royal We" is getting GMT date/time, how did you convert it to PST? Just subtract 7 epoch hours?
- Mon Oct 23, 2017 10:33 pm
- Forum: General Discussion and Questions
- Topic: File mode 'w+'
- Replies: 1
- Views: 2195
File mode 'w+'
Does MicroPython support the 'w+' file mode? w+ : Opens a file for both writing and reading. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing. with open('log.tx', 'w+') as f: v = int(f.read()) v = v+1 f.write(str(v))