1-
1+ """
2+ The Main Loop
3+ """
24
35from mathics .builtin .base import Builtin
46
57
68class IOHookPreRead (Builtin ):
79 '''
810 <dl>
9- <dt>$PreRead
11+ <dt>$PreRead
1012 <dt> is a global variable whose value, if set, is applied to the \
11- text or box form of every input expression before it is fed to the parser.
13+ text or box form of every input expression before it is fed to the parser.
1214 <dt>(Not implemented yet)
1315 </dl>
1416 '''
@@ -17,13 +19,13 @@ class IOHookPreRead(Builtin):
1719class IOHookPre (Builtin ):
1820 '''
1921 <dl>
20- <dt>$Pre
22+ <dt>$Pre
2123 <dt>is a global variable whose value, if set,
2224 is applied to every input expression.
2325 </dl>
2426
2527 Set $Timing$ as the $Pre function, stores the enlapsed time in a variable,
26- stores just the result in Out[$Line] and print a formated version showing the enlapsed time
28+ stores just the result in Out[$Line] and print a formated version showing the enlapsed time
2729 >> $Pre := (Print["[Processing input...]"];#1)&
2830 >> $Post := (Print["[Storing result...]"]; #1)&
2931 | [Processing input...]
@@ -34,7 +36,7 @@ class IOHookPre(Builtin):
3436 >> 2 + 2
3537 | [Processing input...]
3638 | [Storing result...]
37- | The result is:
39+ | The result is:
3840 = {..., 4}
3941 >> $Pre = .; $Post = .; $PrePrint = .; $EnlapsedTime = .;
4042 | [Processing input...]
@@ -43,11 +45,11 @@ class IOHookPre(Builtin):
4345 '''
4446 name = "$Pre"
4547
46-
48+
4749class IOHookPost (Builtin ):
4850 '''
4951 <dl>
50- <dt>$Post
52+ <dt>$Post
5153 <dt>is a global variable whose value, if set,
5254 is applied to every output expression.
5355 </dl>
@@ -58,24 +60,21 @@ class IOHookPost(Builtin):
5860class IOHookPrePrint (Builtin ):
5961 '''
6062 <dl>
61- <dt>$PrePrint
63+ <dt>$PrePrint
6264 <dt>is a global variable whose value, if set,
6365 is applied to every output expression before it is printed.
64- </dl>
66+ </dl>
6567 '''
6668 name = "$PrePrint"
6769
6870
6971class IOHookSyntaxHandler (Builtin ):
7072 '''
7173 <dl>
72- <dt>$SyntaxHandler
74+ <dt>$SyntaxHandler
7375 <dt>is a global variable whose value, if set,
74- is applied to any input string that is found to contain a syntax error.
76+ is applied to any input string that is found to contain a syntax error.
7577 <dt>(Not implemented yet)
7678 </dl>
7779 '''
7880 name = "$SyntaxHandler"
79-
80-
81-
0 commit comments