diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index 339be8840..43691e8e4 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -403,6 +403,7 @@ const ToolboxMessageTree OsModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonOsCommandListdir, I18n::Message::PythonOsListdir, false) }; +#ifdef MICROPY_PY_SYS const ToolboxMessageTree SysModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportSys, I18n::Message::PythonImportSys, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromSys, I18n::Message::PythonImportSys, false), @@ -414,6 +415,7 @@ const ToolboxMessageTree SysModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandVersion, I18n::Message::PythonSysVersion, false), ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandVersioninfo, I18n::Message::PythonSysVersioninfo, false) }; +#endif const ToolboxMessageTree modulesChildren[] = { ToolboxMessageTree::Node(I18n::Message::MathModule, MathModuleChildren), @@ -427,7 +429,9 @@ const ToolboxMessageTree modulesChildren[] = { ToolboxMessageTree::Node(I18n::Message::KandinskyModule, KandinskyModuleChildren), ToolboxMessageTree::Node(I18n::Message::IonModule, IonModuleChildren), ToolboxMessageTree::Node(I18n::Message::OsModule, OsModuleChildren), +#ifdef MICROPY_PY_SYS ToolboxMessageTree::Node(I18n::Message::SysModule, SysModuleChildren), +#endif ToolboxMessageTree::Node(I18n::Message::TimeModule, TimeModuleChildren) }; diff --git a/python/port/mpconfigport.h b/python/port/mpconfigport.h index af81426c3..5f58a24a6 100644 --- a/python/port/mpconfigport.h +++ b/python/port/mpconfigport.h @@ -97,7 +97,7 @@ #define MICROPY_PY_STRUCT (0) // Whether to provide "sys" module -#define MICROPY_PY_SYS (1) +#define MICROPY_PY_SYS (0) // Whether to provide the "urandom" module #define MICROPY_PY_URANDOM (1)