File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ Behavior
133133 ``code.py `` **in the REPL anymore, as the REPL is a fresh vm. ** CircuitPython's goal for this
134134 change includes reducing confusion about pins and memory being used.
135135 - After the main code is finished the REPL can be entered by pressing any key.
136+ - If the file ``repl.py `` exists, it is executed before the REPL Prompt is shown
137+ - In safe mode this functionality is disabled, to ensure the REPL Prompt can always be reached
136138 - Autoreload state will be maintained across reload.
137139
138140- Adds a safe mode that does not run user code after a hard crash or brown out. This makes it
Original file line number Diff line number Diff line change @@ -929,6 +929,11 @@ STATIC int run_repl(safe_mode_t safe_mode) {
929929
930930 autoreload_suspend (AUTORELOAD_SUSPEND_REPL );
931931
932+ if (get_safe_mode () == SAFE_MODE_NONE ) {
933+ const char * const filenames [] = { "repl.py" };
934+ (void )maybe_run_list (filenames , MP_ARRAY_SIZE (filenames ));
935+ }
936+
932937 // Set the status LED to the REPL color before running the REPL. For
933938 // NeoPixels and DotStars this will be sticky but for PWM or single LED it
934939 // won't. This simplifies pin sharing because they won't be in use when
You can’t perform that action at this time.
0 commit comments