diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-05-04 16:35:40 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-05-04 16:53:52 +0300 |
commit | 3d3ef36e977b5f5a4153b8df6447f3f73e4726e3 (patch) | |
tree | 38fc98e386b6d2e2d67e487e1dbf8dd8011a516f /tests/basics/struct1.py | |
parent | 1829d86ef5f4abf172f0cf34abba8113aa538f76 (diff) | |
download | micropython-3d3ef36e977b5f5a4153b8df6447f3f73e4726e3.tar.gz micropython-3d3ef36e977b5f5a4153b8df6447f3f73e4726e3.zip |
modstruct: Rename module to "ustruct", to allow full Python-level impl.
Diffstat (limited to 'tests/basics/struct1.py')
-rw-r--r-- | tests/basics/struct1.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py index c473fc0b0c..87e2f07026 100644 --- a/tests/basics/struct1.py +++ b/tests/basics/struct1.py @@ -1,4 +1,7 @@ -import struct +try: + import ustruct as struct +except: + import struct print(struct.calcsize("<bI")) print(struct.unpack("<bI", b"\x80\0\0\x01\0")) print(struct.calcsize(">bI")) |