how to list all available modules to import

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

how to list all available modules to import

Post by jickster » Fri Sep 15, 2017 8:05 pm

What's the command, to run on serial console, to list all the available modules that can be imported?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: how to list all available modules to import

Post by pythoncoder » Sat Sep 16, 2017 5:13 am

help('modules')
Peter Hinch
Index to my micropython libraries.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: how to list all available modules to import

Post by jickster » Mon Sep 25, 2017 1:51 pm

pythoncoder wrote:help('modules')

That gives me this:

Code: Select all

>>> help('modules')
object modules is of type str
  decode -- <function>
  encode -- <function>
  find -- <function>
  rfind -- <function>
  index -- <function>
  rindex -- <function>
  join -- <function>
  split -- <function>
  rsplit -- <function>
  startswith -- <function>
  endswith -- <function>
  strip -- <function>
  lstrip -- <function>
  rstrip -- <function>
  format -- <function>
  replace -- <function>
  count -- <function>
  lower -- <function>
  upper -- <function>
  isspace -- <function>
  isalpha -- <function>
  isdigit -- <function>
  isupper -- <function>
  islower -- <function>

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: how to list all available modules to import

Post by Roberthh » Mon Sep 25, 2017 4:41 pm

Then you might be using a port on WiPy or LoPy. With the micropython.org ports for Pyboard, ESP8266 and ESP32 help("modules") indeed shows a lits of modules.

Post Reply