Skip to content

batteries

EricGebhart edited this page Sep 27, 2021 · 2 revisions

A few batteries included so far.

There are a few core libraries included within SPR, they are imported by SPR into their various namespaces by core.spr

  • log - logging level and messaging.
  • appstate - yaml datastore - All the YAML, config etc.
  • dialog - dialog windows for the user interface.
  • cli - cli stuff for the user interface, intended to match the dialog API.
  • network - Networking. wifi, ssh, etc.
  • device - Basic usb device interaction
  • particle - Particle.io Board interaction.
  • subcmd - shell commands etc.
  • Bar_qr - a bar and QR code reader, generater, and printer
  • mkext - A function and files to create a sample SPR extension library project.
  • os - Some functions from python OS
  • shutil - Some functions from python shutil
  • web - View HTML or URL, Browse a URL.
  • markdown - Convert Markdown to HTML.

It can be seen that most of these have simple python wrappers which are then imported. Python's os and shutil libraries are imported directly.

SPR:> ls
Namespaces:
   as              -->  Simple_Process_REPL.appstate   Application State functionality
   bq              -->  Simple_Process_REPL.bar_qr     Bar and QR code generation, scanning and printing
   cli             -->  Simple_Process_REPL.cli        User interface using the cli  
   dev             -->  Simple_Process_REPL.device     Device interaction, waiting for, handshaking.
   log             -->  Simple_Process_REPL.logs       logger controls and messages  
   md              -->  Simple_Process_REPL.markdown   Markdown conversion to HTML   
   nw              -->  Simple_Process_REPL.network    Networking stuff, Wifi        
   os              -->  os                             Python os library             
   pio             -->  Simple_Process_REPL.particle   Particle.io Board CLI interface
   sh              -->  Simple_Process_REPL.subcmd     Subprocesses, shell etc.      
   shutil          -->  shutil                         Python shutil library         
   ui              -->  Simple_Process_REPL.dialog     User interface using dialog   
   web             -->  Simple_Process_REPL.webview    View HTML and urls.           

Clone this wiki locally