diff options
author | Reinier Heeres <reinier@heeres.eu> | 2008-12-23 22:03:57 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2008-12-23 22:03:57 (GMT) |
commit | 23545924f4f4b35c08c002117d5cab60eef16c62 (patch) | |
tree | 245c13e99d49ccd4d03afa04a98544492f80226a /astparser.py | |
parent | 9f74de400fa767209e352d58e47ce66e001223a1 (diff) |
Add plot help
Diffstat (limited to 'astparser.py')
-rw-r--r-- | astparser.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/astparser.py b/astparser.py index 8acb145..75bf0f9 100644 --- a/astparser.py +++ b/astparser.py @@ -18,6 +18,10 @@ except ImportError: from mathlib import MathLib from plotlib import PlotLib +PLOTHELP = _( +"plot(eqn, var=-a..b), plot the equation 'eqn' with the variable 'var' in the \ +range from a to b") + class ParseError(Exception): def __init__(self, msg, start, end=None): self._msg = msg @@ -166,9 +170,6 @@ class AstParser: else: self.pl = pl - # Plug-in plot function - self.set_var('plot', self.pl.plot) - # Help manager self._helper = Helper(self) self.set_var('help', self._helper.get_help) @@ -177,6 +178,10 @@ class AstParser: (self.pl.plot, 0): self._ARG_NODE, } + # Plug-in plot function + self.set_var('plot', self.pl.plot) + self._helper.add_help('plot', PLOTHELP) + self._load_plugins() # Redirect operations to registered functions |