From b3853e515751c616ed63b3d3d4a9e25b9e288e5b Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sat, 14 Oct 2023 13:57:42 +0200 Subject: [PATCH] Expand readme --- readme.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index ddee979..5271b04 100644 --- a/readme.txt +++ b/readme.txt @@ -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. \ No newline at end of file +* unbunchify(Bunch): Converts a Bunch into a regular list.