From e11b17c25ff23b5d6c5e74bc2a9bbd28bc8d2fde Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 5 Feb 2014 00:47:06 +0200 Subject: Implement support for sys.path when loading modules. sys.path is not initialized by rt_init(), that's left for platform-specific startup code. (For example, bare metal port may have some hardcoded defaults, and let user change sys.path directly; while port for OS with environment feature can take path from environment). If it's not explicitly initialized, modules will be imported only from a current directory. --- py/runtime.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/runtime.h') diff --git a/py/runtime.h b/py/runtime.h index aafe1a06a..20595c6a5 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -46,3 +46,4 @@ void rt_locals_set(struct _mp_map_t *m); struct _mp_map_t *rt_globals_get(void); void rt_globals_set(struct _mp_map_t *m); struct _mp_map_t *rt_loaded_modules_get(void); +extern mp_obj_t sys_path; -- cgit v1.2.3