-
Notifications
You must be signed in to change notification settings - Fork 2
introspection
Everything SPR does, is in the data store, function definitions, namespaces, everything is there to see and muck with.
Given that there should be some consistency between the modules and their namespaces. A namespace can be explored with the following SPR commands, where is the name of the namespace:
-
lsto see a list of namespaces and functions at /. -
ls <ns>to see a summary of the namespace. -
ls /to see a listing at the root of the datastore. -
help <ns>to get help for the namespace. -
help <ns>/<function>to get help for a function in the namespace. -
pyhelp <ns>to get python help for the namespace. -
pyhelp <ns>/<function>to get python help for a function in the namespace.
Explore datastore with ls / and show.
-
showto see the current with path and contents. -
show /path/to/whateverto see the data tree at that point. -
show <ns>to see the Stateful data used by the namespace, if any, possibly. -
show /config/<ns>to see the configuration data used by the device namespace
Other ways to see things.
-
cli/msg ~/platformprint the platform and wait for response. -
log/info ~/platformprint the platform to the console and log. -
log/info ~/_with_print the with stack as python data.
The with stack is actually held at /_with_ by default and can be seen there with ls and show.
-
withto see the current with path and contents listing. -
as/show-withto see the current with stack data tree. -
ls-withto see the with stack. -
pop-withto pop the stack. - equivalent topop /~/\_with_path\_ -
flat-withto see a flattened map of variables in the with stack. -
showto see the current with.
The SPR namespaces are in /_Root_.