Commit c92672d7 authored by Damien George's avatar Damien George
Browse files

unix: Make -c option parse input script as a file, as per CPython.

Addresses issue #915.
parent b7a4b0f8
......@@ -193,7 +193,7 @@ STATIC int do_file(const char *file) {
STATIC int do_str(const char *str) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, str, strlen(str), false);
return execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, false);
return execute_from_lexer(lex, MP_PARSE_FILE_INPUT, false);
int usage(char **argv) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment