External Links

Creative Science Centre

 

Help System

This applies only to devices that have an SD Card. The developer or user creates a file is created called help.txt using a Python program from a directory where all of the .bas files are stored. This can then be read in various different ways to display the function name and comment whilst still using the serial connection.

This is an example, first get all the functions with "get" in the name and then the details of the function using help.lc. The particular function in the example is in the 'netutils.bas' file, requires a string for input and will return the IP address as a string.

The system has two sides:

1) man.bas which runs the help system inside the ByPic (BvSerial windows as above)

2) Creating the help.txt is done by using a Python program

Function format

For this system to work a simple format is used for commenting functions thus:

// **************
// comments go here
// **************
function function_name(......

The Python program will read all of the .bas files (except main.bas) in the chosen directory and create a help file. It does this by looking for the word 'function' and then expecting the comments for that function to be above the word as shown.

Running the Python program

The python program is called bypicman.py and is in this this zip file. The program is run at the command line:

python bypicman.py c:\myprograms\myproject help.txt

The second parameter is the directory where all of the ByPic programs reside that you want to put into the help.txt file. The file can be called something different than help.txt but calling it that will match the man.bas program. Help.txt will be saved in the same directory as the .bas files.

Installing man.bas

This is juts an ordinary ByPic program and should be downloaded and saved to flash, typing help will bring up the help functions that are available.