-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- merged from #1026 - provided 5 programmable buttons in the webui.
- Loading branch information
Showing
8 changed files
with
266 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# part that executes a no-arg method when a button is clicked | ||
# | ||
|
||
|
||
class ExplodeDict: | ||
def __init__(self, memory, output_prefix = ""): | ||
""" | ||
Break a map into key/value pairs and write | ||
them to the output memory, optionally | ||
prefixing the key on output. | ||
Basically, take a dictionary and write | ||
it to the output. | ||
""" | ||
self.memory = memory | ||
self.prefix = output_prefix | ||
|
||
def run(self, key_values): | ||
if type(key_values) is dict: | ||
for key in key_values: | ||
self.memory[self.prefix + key] = key_values[key] | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.