kopia lustrzana https://github.com/micropython/micropython
minimal: Support even-driven REPL.
rodzic
87bc8e2b3d
commit
d7337f288e
|
@ -60,7 +60,17 @@ int main(int argc, char **argv) {
|
|||
gc_init(heap, heap + sizeof(heap));
|
||||
#endif
|
||||
mp_init();
|
||||
#if MICROPY_REPL_EVENT_DRIVEN
|
||||
pyexec_friendly_repl_init();
|
||||
for (;;) {
|
||||
int c = stdin_rx_chr();
|
||||
if (pyexec_friendly_repl_process_char(c)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
pyexec_friendly_repl();
|
||||
#endif
|
||||
//do_str("print('hello world!', list(x+1 for x in range(10)), end='eol\\n')");
|
||||
mp_deinit();
|
||||
return 0;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#define MICROPY_MEM_STATS (0)
|
||||
#define MICROPY_DEBUG_PRINTERS (0)
|
||||
#define MICROPY_ENABLE_GC (1)
|
||||
#define MICROPY_REPL_EVENT_DRIVEN (0)
|
||||
#define MICROPY_HELPER_REPL (1)
|
||||
#define MICROPY_HELPER_LEXER_UNIX (0)
|
||||
#define MICROPY_ENABLE_SOURCE_LINE (0)
|
||||
|
|
Ładowanie…
Reference in New Issue