Commit Graph

18 Commits

Author SHA1 Message Date
microDev
a46aa48e23
Convert more modules to use MP_REGISTER_MODULE
Convert espidf, os, rp2pio, samd and time to use MP_REGISTER_MODULE.

Related to #5183.
2021-10-05 16:58:24 +05:30
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Mike Causer
eedcc98cc5 Fix some spelling mistakes 2020-12-10 02:52:18 +11:00
Taku Fukada
56c898da80 Modify some Python stubs 2020-08-07 01:01:28 +09:00
Taku Fukada
d356581651 Fix several type hints 2020-07-27 18:05:13 +09:00
Taku Fukada
54a342a7f5 Add and correct some type hints 2020-07-24 18:20:03 +09:00
dherrada
612c6bb86b
Merge branch 'main' into type_hints 2020-07-17 14:55:30 -04:00
Diego Elio Pettenò
34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
dherrada
e237dfe3c5 Added type hints to os 2020-07-03 15:18:44 -04:00
Scott Shawcroft
4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada
09530e5dc3
Did os, _pixelbuf, _pew 2020-05-08 16:03:39 -04:00
Dan Halbert
e0753c4ad2 avoid os.stat() int overflow on smallint-only builds 2020-02-14 18:33:37 -05:00
Jeff Epler
6735283d8f os: Don't require an on-stack buffer
This allows urandom requests of even 100k bytes to succeed on a fresh
VM session on a Metro M4 express.
2020-01-08 09:43:13 -06:00
Scott Shawcroft
de5a9d72dc
Compress all translated strings with Huffman coding.
This saves code space in builds which use link-time optimization.
The optimization drops the untranslated strings and replaces them
with a compressed_string_t struct. It can then be decompressed to
a c string.

Builds without LTO work as well but include both untranslated
strings and compressed strings.

This work could be expanded to include QSTRs and loaded strings if
a compress method is added to C. Its tracked in #531.
2018-08-16 17:40:57 -07:00
Dan Halbert
327b0f76da fix os.listdir() when current dir is '/' 2018-06-15 10:51:03 -04:00
Dan Halbert
c679c80c71 Modernize module and class static dicts; update freetouch 2017-08-27 15:02:50 -04:00
Scott Shawcroft
a0058e6712 Introduce a random module that is a subset of CPython's random. It
also initializes in the same way where it takes from a true random
source when available through os.urandom(). After initializing, it
produces deterministic results until the seed is set.

This replaces urandom!

Fixes #139.
2017-06-27 17:37:24 -07:00
Scott Shawcroft
778e975936 Split uos module into os and storage.
os is a subset of CPython's os. storage contains additional
file system mounting functionality based on UNIX's mount
management.

Fixes #140
2017-06-27 15:17:30 -07:00