-
Notifications
You must be signed in to change notification settings - Fork 0
Py93's variables
Py93 defines a JavaScript variable on Windows93 boot.
Here goes a tree representation of $py93:
$py93
├ launchShell()
└ shellGate
├ ignore (bool)
└ pkgConts[strings] (array)
A global variable that contains Py93's JavaScript stuff.
A function that opens file /a/Py93/console.html using iframe.
Takes no parameters.
Source code:
$py93.launchShell = function() {
$fs.utils.getMenuOpenWith('/a/Py93/console.html')[0].action();
}A variable that contains stuff for shell.
Shell "exports" this variable using the following piece of code:
var gate = window.parent.$py93.shellGateThen, it gets data from the gate variable, here's an example:
if (!gate.ignore) {
// do this..
}A boolean.
If we don't need to load packages, (shell was launched with --packages-ignore or -pi option) this variable will be equal to true.
If not, then it's equal to false.
An array that contains contents of package files in strings.
After boot, it's completely empty. ([])
It gets filled on shell launching process. (even if option --packages-ignore or -pi is given, it's still fills)
On shell launching process, we're grabbing all files (and directories too) in /a/Py93/packages/ using $fs.utils.getFileMenu, and getting contents of every file which name ends with .brython.js using $db.getRaw, then pushing it to $py93.shellGate.pkgConts.
The shell gets the $py93.shellGate.pkgConts variable from window.parent, loops through the array using arr.forEach, and loads every string in the array using new Function(string_from_array)();
Reserved variables are variables which name starts with r_Py93__.
Reserved variables currently (v1.1.2.1) used only in compiled files.