Releases: XenseEducation/spiketools-release
Spike Tools v0.0.3
What's new
- spike-package.exe is updated to support App version 1.3.3 and Hub OS 3.0.1
More information
- The file size only 9MB. The GUI is very snappy. Thanks to the wonderful work from DearPyGui.
- You need to be run it on Windows 10 64bit system with DirectX11 support.
- It is best to download the program to the directory where you have your project files, as
Open
button will show the project files in that directory first. - It also reduces the lag time after you start a program, because of pre-compiled programs and reusable libraries.
- Screenshot
- 2 project files will be created for your input project (
[name].llsp
):[name]-install.llsp
: will install your project[name]-remove.llsp
: will remove your project
Spike Tools v0.0.2
What's new
- spike-package.exe is now a GUI tool
Spike Library Creator
, making it easier for kids/students to generate and install/remove their own reusable python libraries. - The file size only increases by 1MB. The GUI is very snappy. Thanks to the wonderful work from DearPyGui.
- You need to be run it on Windows 10 64bit system with DirectX11 support.
- It avoids (in most cases) HUB not able to load large python program, because it will pre-compile the libraries before loading to the HUB.
- It is best to download the program to the directory where you have your project files, as
Open
button will show the project files in that directory first. - It also reduces the lag time after you start a program, because of pre-compiled programs and reusable libraries.
- Screenshot
- 2 project files will be created for your input project (
[name].llsp
):[name]-install.llsp
: will install your project[name]-remove.llsp
: will remove your project
v0.0.1
Super early preview of the cool things which will be coming. This one only have one function:
- NEW: Add
spike-package.exe
which will cross-compile python project, so as to save memory and improve runtime of loading a program. It will also enable sharing of reusable functions by multiple Spike Prime projects (program slots)
Please file bugs or requests via Issues
tab: (https://github.com/XenseEducation/spiketools-release/issues)
This is designed to be super easy to use, no installation needed. And I restricted where the compiled code (.mpy) can go (only to /projects directory) to avoid accidents by kids or students.
To use, just download the spike-package.exe
file and run it under command prompt:
spike-package.exe -h
IMPORTANT! Before generating the package project (Xense.llsp
) please remember to close the project from Spike App if you have previously generated and opened the project!
What's behind the scene?
What's behind the scene (when you do spike-package.exe myprogram.llsp
):
- create a temporary directory in your system
- extract the python code from
myprogram.llsp
to the temporary directory asmyprogram.py
- it will check for some basic requirements, like: it has to be a python-based project, the name of the program should not contain spaces, etc
- compile
myprogram.py
intomyprogram.mpy
- create
Xense.py
:- add a simple python loader
- add
xsloader.mpy
(this contain all the nice handling of loading files into the hub) - add
myprogram.mpy
- create
Xense.llsp
- clean up temporary directory
What's behind the scene (when you load Xense.llsp
to Spike App and run it):
- the simple python loader will look for
xsloader.mpy
by reading itself and read its content, then it will writexsloader.mpy
to/xsloader.mpy
in your HUB filesystem - it will use
__import()__
to dynamically load thexsloader
module and use its function to read the rest of the content. It has better handling of reading.py
,.mpy
, or even any type of files, with some bells-and-whistles on UI (light and sound)
FAQ
- Q: What is happening on the Spike when you want to update the library? Does the new one replace the old one?
- A: Every time you run
Xense.llsp
from Spike App it will update the library in the HUB filesystem. Yes, new one replaces the old one.
- A: Every time you run
- Q: How can you know if the library is already loaded on the Spike?
- A: if you run the following program and it is not complaining then your library (let's call it
your_library
) is loaded:from projects import your_library
- A: if you run the following program and it is not complaining then your library (let's call it
- Q: A help file should give a real world small example with a description step by step.
- A: TBD