Expand readme

This commit is contained in:
Fierelier 2023-10-14 13:57:42 +02:00
parent 143efc7db3
commit b3853e5157
1 changed files with 3 additions and 3 deletions

View File

@ -19,12 +19,12 @@ Provides the following mfp.* (global to all scripts):
* pUp(path): Goes up (..) in the path.
* setProgramName(name): Set the name of your main program, only works on first call. You should run it before running any other mfp modules.
* programName: The name of your program. DO NOT modify this variable directly, use mfp.setProgramName().
* require(name): Runs a module from mfp.paths, saves its global, and returns the script's global as a Bunch. If a module of the same name has already been required, it returns the already saved global.
* require(name,env): Runs a module from mfp.paths, saves its global, and returns the script's global as a Bunch. The module's global is saved in env. If env is not defined, it saves the global in the main env. If a module of the same name has already been required, it returns the already saved global.
* dorequire(name): Does the same as above, but does not save the globals, and can re-require.
* paths: The directories mfp should search for modules in with mfp.require(). ? in all paths is replaced with the name given to mfp.require().
* paths: The directories mfp should search for modules in with mfp.require(). "?" in all paths is replaced with the name given to mfp.require().
* dofile(path): Runs a script from a raw path. It does not use mfp.paths. Returns the script's global as a Bunch.
* docode(text): Runs string as Python code. Returns the script's global as a Bunch.
* g: A Bunch where you can store variables accessible by all mfp modules and scripts.
* Bunch(): Creates a Bunch. Read about it here: https://github.com/Infinidat/munch
* bunchify(list): Converts a list into a Bunch.
* unbunchify(Bunch): Converts a Bunch into a regular list.
* unbunchify(Bunch): Converts a Bunch into a regular list.