Skip to content

Instantly share code, notes, and snippets.

View wnienhaus's full-sized avatar

Wilko Nienhaus wnienhaus

View GitHub Profile
@wnienhaus
wnienhaus / package.json
Last active August 8, 2023 17:20
mip package.json
{
"v":1,
"version":"1.2.0",
"urls":[
["esp32_ulp/__init__.py","github:micropython/micropython-esp32-ulp/esp32_ulp/__init__.py"],
["esp32_ulp/__main__.py","github:micropython/micropython-esp32-ulp/esp32_ulp/__main__.py"],
["esp32_ulp/assemble.py","github:micropython/micropython-esp32-ulp/esp32_ulp/assemble.py"],
["esp32_ulp/definesdb.py","github:micropython/micropython-esp32-ulp/esp32_ulp/definesdb.py"],
["esp32_ulp/link.py","github:micropython/micropython-esp32-ulp/esp32_ulp/link.py"],
["esp32_ulp/nocomment.py","github:micropython/micropython-esp32-ulp/esp32_ulp/nocomment.py"],
@wnienhaus
wnienhaus / sys_path_diff_mpy_vs_py3.txt
Created August 11, 2019 20:47
Setting sys.path: Micropython vs Python
## Difference Between MicroPython and Python 3 when setting sys.path
# tested with MicroPython on Linux
# * built from git master
# * version = MicroPython v1.11-194-g3d02ebb4e-dirty
# tested with python3.4 on Linux (Python 3.4.3)
# * using docker container micktwomey/python3.4
# * version = Python 3.4.3 (default, Oct 14 2015, 20:28:29)
##
@wnienhaus
wnienhaus / fix_frozen_import_from_script.patch
Last active August 11, 2019 16:30
Experimental patch: For directly run scripts, keep '' in sys.path (insert base dir, instead of replacing '' entry)
diff --git a/ports/unix/main.c b/ports/unix/main.c
index cd2dc49a5..c8b82794f 100644
--- a/ports/unix/main.c
+++ b/ports/unix/main.c
@@ -621,8 +621,14 @@ MP_NOINLINE int main_(int argc, char **argv) {
break;
}
- // Set base dir of the script as first entry in sys.path
+ // Add base dir of the script as first entry in sys.path