File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ Behavior
133
133
``code.py `` **in the REPL anymore, as the REPL is a fresh vm. ** CircuitPython's goal for this
134
134
change includes reducing confusion about pins and memory being used.
135
135
- 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
136
138
- Autoreload state will be maintained across reload.
137
139
138
140
- 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) {
929
929
930
930
autoreload_suspend (AUTORELOAD_SUSPEND_REPL );
931
931
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
+
932
937
// Set the status LED to the REPL color before running the REPL. For
933
938
// NeoPixels and DotStars this will be sticky but for PWM or single LED it
934
939
// 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