Module interpreter
source code
The prompt based relax user interface (UI).
|
exec_script(name,
globals)
Execute the script. |
source code
|
|
|
|
|
interact_script(self,
intro=None,
local={ } ,
script_file=None,
show_script=True,
raise_relax_error=False)
Replacement function for 'code.InteractiveConsole.interact'. |
source code
|
|
|
|
|
run_script(intro=None,
local=None,
script_file=None,
show_script=True,
raise_relax_error=False)
Python interpreter emulation. |
source code
|
|
|
|
|
status = Status()
|
|
uf_info = Uf_info()
|
|
PS1_ORIG = ' relax> '
|
|
PS2_ORIG = ' relax| '
|
|
PS3_ORIG = ' \nrelax> '
|
|
PS1_COLOUR = ' \x1b[94mrelax> \x1b[0m '
|
|
PS2_COLOUR = ' \x1b[94mrelax| \x1b[0m '
|
|
PS3_COLOUR = ' \n\x1b[94mrelax> \x1b[0m '
|
|
__package__ = ' prompt '
|
Imports:
dep_check,
InteractiveConsole,
ansi,
pi,
getcwd,
path,
pager,
search,
readline,
runpy,
sys,
Info_box,
Ls,
Lh,
Ll,
system,
_Helper,
_Helper_python,
Tab_completion,
Class_container,
Uf_object,
AllRelaxErrors,
RelaxError,
Status,
uf_translation_table,
Uf_info
interact_prompt(self,
intro=None,
local={ } )
| source code
|
Replacement function for 'code.InteractiveConsole.interact'.
This will enter into the prompt.
- Parameters:
intro (str) - The string to print prior to jumping to the prompt mode.
local (dict) - A namespace which will become that of the prompt (i.e. the
namespace visible to the user when in the prompt mode). This
should be the output of a function such as locals().
|
interact_script(self,
intro=None,
local={ } ,
script_file=None,
show_script=True,
raise_relax_error=False)
| source code
|
Replacement function for 'code.InteractiveConsole.interact'.
This will execute the script file.
- Parameters:
intro (str) - The string to print prior to jumping to the prompt mode.
local (dict) - A namespace which will become that of the prompt (i.e. the
namespace visible to the user when in the prompt mode). This
should be the output of a function such as locals().
script_file (None or str) - The script file to be executed.
show_script (bool) - If true, the relax will print the script contents prior to
executing the script.
raise_relax_error (bool) - If false, the default, then a nice error message will be sent to
STDERR, without a traceback, when a RelaxError occurs. This is
to make things nicer for the user.
|
Python interpreter emulation.
This function replaces 'code.interact'.
- Parameters:
intro (str) - The string to print prior to jumping to the prompt mode.
local (dict) - A namespace which will become that of the prompt (i.e. the
namespace visible to the user when in the prompt mode). This
should be the output of a function such as locals().
|
run_script(intro=None,
local=None,
script_file=None,
show_script=True,
raise_relax_error=False)
| source code
|
Python interpreter emulation.
This function replaces 'code.interact'.
- Parameters:
intro (str) - The string to print prior to jumping to the prompt mode.
local (dict) - A namespace which will become that of the prompt (i.e. the
namespace visible to the user when in the prompt mode). This
should be the output of a function such as locals().
script_file (None or str) - The script file to be executed.
show_script (bool) - If true, the relax will print the script contents prior to
executing the script.
raise_relax_error (bool) - If false, the default, then a nice error message will be sent to
STDERR, without a traceback, when a RelaxError occurs. This is
to make things nicer for the user.
|
Replacement code for code.InteractiveInterpreter.runcode.
- Parameters:
code (str) - The code to execute.
|