Python Forum

Full Version: Inspecting without using inspect
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
Is the following link any help to you?
https://lego.github.io/MINDSTORMS-Robot-...index.html
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.
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