summaryrefslogtreecommitdiffstatshomepage
path: root/teensy/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'teensy/main.c')
-rw-r--r--teensy/main.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/teensy/main.c b/teensy/main.c
index 8de26f25e8..3b2994c86f 100644
--- a/teensy/main.c
+++ b/teensy/main.c
@@ -269,6 +269,9 @@ soft_reset:
// Micro Python init
mp_init();
+ mp_obj_list_init(mp_sys_path, 0);
+ mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
+ mp_obj_list_init(mp_sys_argv, 0);
readline_init0();
@@ -369,12 +372,3 @@ char * ultoa(unsigned long val, char *buf, int radix)
}
return buf;
}
-
-STATIC NORETURN mp_obj_t mp_sys_exit(uint n_args, const mp_obj_t *args) {
- int rc = 0;
- if (n_args > 0) {
- rc = mp_obj_get_int(args[0]);
- }
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_SystemExit, mp_obj_new_int(rc)));
-}
-MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_exit_obj, 0, 1, mp_sys_exit);