From 338132e5583fb259576394d9a4d2b0892c23726b Mon Sep 17 00:00:00 2001
From: Daniel Hoffend <dh@dotlan.net>
Date: Wed, 21 Aug 2019 14:54:37 +0200
Subject: [PATCH] apped apps folder to search module search path

---
 pycardium/main.c             | 10 ++++++++++
 pycardium/modules/qstrdefs.h |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/pycardium/main.c b/pycardium/main.c
index f8f3f793..56a7575a 100644
--- a/pycardium/main.c
+++ b/pycardium/main.c
@@ -45,6 +45,16 @@ int main(void)
 
 		mp_init();
 
+		/* request by badge.team */
+		mp_obj_list_init(mp_sys_path, 0);
+		mp_obj_list_append(mp_sys_path, MP_ROM_QSTR(MP_QSTR_));
+		mp_obj_list_append(
+			mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)
+		);
+		mp_obj_list_append(
+			mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_apps)
+		);
+
 		if (cnt > 0) {
 			pyexec_file_if_exists(script_name);
 		}
diff --git a/pycardium/modules/qstrdefs.h b/pycardium/modules/qstrdefs.h
index 9e3f3979..68b5a14e 100644
--- a/pycardium/modules/qstrdefs.h
+++ b/pycardium/modules/qstrdefs.h
@@ -119,6 +119,10 @@ Q(OUTPUT)
 Q(PULL_UP)
 Q(PULL_DOWN)
 
+/* path */
+Q(/apps)
+Q(/lib)
+
 /* personal_state */
 Q(personal_state)
 Q(get)
-- 
GitLab