File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111# add some custom names to map characters that aren't in HTML
1212codepoint2name [ord ('.' )] = 'dot'
13+ codepoint2name [ord (':' )] = 'colon'
14+ codepoint2name [ord ('/' )] = 'slash'
1315
1416# this must match the equivalent function in qstr.c
1517def compute_hash (qstr ):
Original file line number Diff line number Diff line change @@ -411,6 +411,11 @@ int main(void) {
411411 // Micro Python init
412412 qstr_init ();
413413 rt_init ();
414+ mp_obj_t def_path [3 ];
415+ def_path [0 ] = MP_OBJ_NEW_QSTR (MP_QSTR_0_colon__slash_ );
416+ def_path [1 ] = MP_OBJ_NEW_QSTR (MP_QSTR_0_colon__slash_src );
417+ def_path [2 ] = MP_OBJ_NEW_QSTR (MP_QSTR_0_colon__slash_lib );
418+ sys_path = mp_obj_new_list (3 , def_path );
414419
415420#if MICROPY_HW_HAS_LCD
416421 // LCD init (just creates class, init hardware by calling LCD())
Original file line number Diff line number Diff line change @@ -30,3 +30,7 @@ Q(Usart)
3030Q (ADC )
3131Q (open )
3232Q (File )
33+ // Entries for sys.path
34+ Q (0 :/)
35+ Q (0 :/src )
36+ Q (0 :/lib )
You can’t perform that action at this time.
0 commit comments