33 #if MICROPY_PY_BUILTINS_HELP 35 const char mp_help_default_text[] =
36 "Welcome to MicroPython!\n" 38 "For online docs please visit http://docs.micropython.org/\n" 41 " CTRL-A -- on a blank line, enter raw REPL mode\n" 42 " CTRL-B -- on a blank line, enter normal REPL mode\n" 43 " CTRL-C -- interrupt a running program\n" 44 " CTRL-D -- on a blank line, exit or do a soft reset\n" 45 " CTRL-E -- on a blank line, enter paste mode\n" 47 "For further help on a specific object, type help(obj)\n" 58 #if MICROPY_PY_BUILTINS_HELP_MODULES 60 for (
size_t i = 0; i < map->
alloc; i++) {
61 if (MP_MAP_SLOT_IS_FILLED(map, i)) {
67 #if MICROPY_MODULE_FROZEN 78 STATIC void mp_help_print_modules(
void) {
83 #if MICROPY_MODULE_WEAK_LINKS 87 #if MICROPY_MODULE_FROZEN_STR 88 extern const char mp_frozen_str_names[];
89 mp_help_add_from_names(
list, mp_frozen_str_names);
92 #if MICROPY_MODULE_FROZEN_MPY 93 extern const char mp_frozen_mpy_names[];
94 mp_help_add_from_names(
list, mp_frozen_mpy_names);
101 #define NUM_COLUMNS (4) 102 #define COLUMN_WIDTH (18) 106 unsigned int num_rows = (len + NUM_COLUMNS - 1) / NUM_COLUMNS;
107 for (
unsigned int i = 0; i < num_rows; ++i) {
115 int gap = COLUMN_WIDTH - l;
132 #if MICROPY_PY_BUILTINS_HELP_MODULES 134 mp_help_print_modules();
172 mp_help_print_obj(
args[0]);
179 #endif // MICROPY_PY_BUILTINS_HELP const mp_map_t mp_builtin_module_map
mp_map_t * mp_obj_dict_get_map(mp_obj_t self_in)
const mp_map_t mp_builtin_module_weak_links_map
#define MP_OBJ_IS_TYPE(o, t)
void mp_obj_print(mp_obj_t o_in, mp_print_kind_t kind)
mp_obj_type_t * mp_obj_get_type(mp_const_obj_t o_in)
int mp_print_str(const mp_print_t *print, const char *str)
#define MP_OBJ_NEW_QSTR(qst)
mp_obj_t mp_obj_new_list(size_t n, mp_obj_t *items)
mp_obj_dict_t * mp_obj_module_get_globals(mp_obj_t self_in)
const mp_map_t mp_const_empty_map
mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg)
size_t strlen(const char *s)
#define MP_PYTHON_PRINTER
void mp_obj_list_get(mp_obj_t self_in, size_t *len, mp_obj_t **items)
mp_obj_t mp_obj_new_str(const char *data, size_t len, bool make_qstr_if_not_already)
#define MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(obj_name, n_args_min, n_args_max, fun_name)
const mp_obj_type_t mp_type_type
const char * mp_obj_str_get_str(mp_obj_t self_in)
mp_obj_t mp_obj_list_sort(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs)
const mp_obj_type_t mp_type_dict
const mp_obj_type_t mp_type_module
int mp_printf(const mp_print_t *print, const char *fmt,...)
const char MICROPY_PY_BUILTINS_HELP_TEXT[]
struct _mp_obj_dict_t * locals_dict