Python Forum
Inspecting without using inspect
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inspecting without using inspect
#1
I am playing around with LEGO Spike Prime which runs Micropython. help() on this thing is less then helpful, but I can figure out a lot using dir(). One thing I haven't been able to figure out is what the arguments are for any of the functions. This thing does not have an inspect library. I just try different argument combinations to see what the error messages are, so I know the number and types of the arguments, but I don't know what they do. Does anybody know of a way that I can see the function declarations?
Reply
#2
Is the following link any help to you?
https://lego.github.io/MINDSTORMS-Robot-...index.html
Reply
#3
Helpful indeed, but I've been having fun doing a black-box type investigation and seeing just how far I can go without having access to the source.
Reply
#4
With Micropy Cli get Autocompletion/ Intellisense in VS Code.
Stuff that i use for investigation other that VC Code,Ptpython: A Better Python REPL, pdir2.
You may be able to run it micropython-lib
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Inspect.getmembers with isclass returns an empty list Aldar 1 2,777 Oct-02-2019, 01:48 PM
Last Post: Aldar
  module inspect error jupiter 1 2,773 Sep-17-2018, 08:37 AM
Last Post: Mekire
  How to inspect the code of __exit__ method used with 'with' statement? sonicblind 3 3,370 Oct-18-2017, 01:51 PM
Last Post: sonicblind

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020