mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 21:11:32 +00:00
Nicen some EventHandler API docstrings
This commit is contained in:
parent
b1592e8ebb
commit
0b651abb7d
@ -54,7 +54,8 @@ class TerminadoEventHandler(EventHandlerBase):
|
|||||||
Writes a string to the terminal session (on the pty level).
|
Writes a string to the terminal session (on the pty level).
|
||||||
Useful for pre-typing and executing commands for the user.
|
Useful for pre-typing and executing commands for the user.
|
||||||
|
|
||||||
:param data['shellcmd']: command to be written to the pty
|
:param data: TFW message data containing keys:
|
||||||
|
|-shellcmd: command to be written to the pty
|
||||||
"""
|
"""
|
||||||
self.terminado_server.pty.write(data['shellcmd'])
|
self.terminado_server.pty.write(data['shellcmd'])
|
||||||
|
|
||||||
@ -62,7 +63,8 @@ class TerminadoEventHandler(EventHandlerBase):
|
|||||||
"""
|
"""
|
||||||
Reads the history of commands executed.
|
Reads the history of commands executed.
|
||||||
|
|
||||||
:param data['count']: the number of history elements to return
|
:param data: TFW message data containing keys:
|
||||||
|
|-count: the number of history elements to return
|
||||||
:return: message with list of commands in data['history']
|
:return: message with list of commands in data['history']
|
||||||
"""
|
"""
|
||||||
data['count'] = int(data.get('count', 1))
|
data['count'] = int(data.get('count', 1))
|
||||||
|
@ -141,7 +141,8 @@ class WebideEventHandler(EventHandlerBase, MonitorManagerMixin):
|
|||||||
"""
|
"""
|
||||||
Overwrites a file with the desired string.
|
Overwrites a file with the desired string.
|
||||||
|
|
||||||
:param data['content']: string containing the desired file contents
|
:param data: TFW message data containing keys:
|
||||||
|
|-string: containing the desired file contents
|
||||||
"""
|
"""
|
||||||
self.monitor.ignore = self.monitor.ignore + 1
|
self.monitor.ignore = self.monitor.ignore + 1
|
||||||
try:
|
try:
|
||||||
@ -155,7 +156,8 @@ class WebideEventHandler(EventHandlerBase, MonitorManagerMixin):
|
|||||||
"""
|
"""
|
||||||
Selects a file from the current directory.
|
Selects a file from the current directory.
|
||||||
|
|
||||||
:param data['filename']: name of file to select relative to the current directory
|
:param data: TFW message data containing keys:
|
||||||
|
|-filename: name of file to select relative to the current directory
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
self.filemanager.filename = data['filename']
|
self.filemanager.filename = data['filename']
|
||||||
@ -167,7 +169,8 @@ class WebideEventHandler(EventHandlerBase, MonitorManagerMixin):
|
|||||||
"""
|
"""
|
||||||
Select a new working directory to display files from.
|
Select a new working directory to display files from.
|
||||||
|
|
||||||
:param data['directory']: absolute path of diretory to select.
|
:param data: TFW message data containing keys:
|
||||||
|
|-directory: absolute path of diretory to select.
|
||||||
must be a path whitelisted in
|
must be a path whitelisted in
|
||||||
self.allowed_directories
|
self.allowed_directories
|
||||||
"""
|
"""
|
||||||
@ -187,7 +190,8 @@ class WebideEventHandler(EventHandlerBase, MonitorManagerMixin):
|
|||||||
"""
|
"""
|
||||||
Overwrite list of excluded files
|
Overwrite list of excluded files
|
||||||
|
|
||||||
:param data['exclude']: list of filename patterns to be excluded, e.g.: ["*.pyc", "*.o"]
|
:param data: TFW message data containing keys:
|
||||||
|
|-exclude: list of filename patterns to be excluded, e.g.: ["*.pyc", "*.o"]
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
self.filemanager.exclude = list(data['exclude'])
|
self.filemanager.exclude = list(data['exclude'])
|
||||||
|
Loading…
Reference in New Issue
Block a user