summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-05 21:27:05 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-05 21:27:05 +0000
commitcdcb4906d41f42789f6610047e8ae6aa79a61e47 (patch)
tree099453009838e4ba11de4a32cda89f076dc20256 /py/runtime.c
parentb8ec17c2d16407dd186d1f8f76c1e7c420bb7729 (diff)
parent911089606376e60bd9451a85eb9558a23cde9039 (diff)
Merge pull request #262 from pfalcon/sys-path
Implement sys.path support
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 9327f0d6a..fc18c0151 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -169,8 +169,14 @@ void rt_init(void) {
#if MICROPY_CPYTHON_COMPAT
// Precreate sys module, so "import sys" didn't throw exceptions.
- mp_obj_new_module(MP_QSTR_sys);
+ mp_obj_t m_sys = mp_obj_new_module(MP_QSTR_sys);
+ // Avoid warning of unused var
+ (void)m_sys;
#endif
+ // init sys.path
+ // for efficiency, left to platform-specific startup code
+ //sys_path = mp_obj_new_list(0, NULL);
+ //rt_store_attr(m_sys, MP_QSTR_path, sys_path);
mp_module_micropython_init();