diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-04 20:08:21 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-05 12:29:15 +0300 |
commit | c6813d92db57c0973d0c93e1053deb4181076277 (patch) | |
tree | f5bb4218d17052e7e071ac6937df17266c9ba752 /py/builtintables.c | |
parent | a0d32991ed57ebbbb8c9207dab3223b12ca4aa44 (diff) |
py: Put default namespace into module __main__.
That's how CPython has it, in particular, "import __main__" should work.
Diffstat (limited to 'py/builtintables.c')
-rw-r--r-- | py/builtintables.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/builtintables.c b/py/builtintables.c index 03fb92e56..1edeefa44 100644 --- a/py/builtintables.c +++ b/py/builtintables.c @@ -118,6 +118,7 @@ STATIC const mp_builtin_elem_t builtin_object_table[] = { }; STATIC const mp_builtin_elem_t builtin_module_table[] = { + { MP_QSTR___main__, (mp_obj_t)&mp_module___main__ }, { MP_QSTR_micropython, (mp_obj_t)&mp_module_micropython }, { MP_QSTR_array, (mp_obj_t)&mp_module_array }, |