diff --git a/docs/unix/quickref.rst b/docs/unix/quickref.rst index a5180fa6cb..ec5312a535 100644 --- a/docs/unix/quickref.rst +++ b/docs/unix/quickref.rst @@ -82,8 +82,9 @@ Environment variables .. envvar:: MICROPYPATH Overrides the default search path for MicroPython libraries. ``MICROPYPATH`` - should be set to a colon separated list of directories. If ``MICROPYPATH`` is - not defined, the search path will be ``~/.micropython/lib:/usr/lib/micropython`` + should be set to a colon (semicolon for Windows port) separated list of + directories. If ``MICROPYPATH`` is not defined, the search path will be + ``~/.micropython/lib:/usr/lib/micropython`` (``~/.micropython/lib`` for Windows port) or the value of the ``MICROPY_PY_SYS_PATH_DEFAULT`` option if it was set when MicroPython itself was compiled. diff --git a/ports/windows/mpconfigport.h b/ports/windows/mpconfigport.h index fae01d74ee..2d852a8222 100644 --- a/ports/windows/mpconfigport.h +++ b/ports/windows/mpconfigport.h @@ -81,6 +81,9 @@ #define MICROPY_PY_BUILTINS_SLICE_ATTRS (1) #define MICROPY_PY_SYS_EXIT (1) #define MICROPY_PY_SYS_PLATFORM "win32" +#ifndef MICROPY_PY_SYS_PATH_DEFAULT +#define MICROPY_PY_SYS_PATH_DEFAULT "~/.micropython/lib" +#endif #define MICROPY_PY_SYS_MAXSIZE (1) #define MICROPY_PY_SYS_STDFILES (1) #define MICROPY_PY_SYS_EXC_INFO (1)