easycoder 250220.1__tar.gz → 250222.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of easycoder might be problematic. Click here for more details.
- {easycoder-250220.1 → easycoder-250222.1}/PKG-INFO +2 -2
- {easycoder-250220.1 → easycoder-250222.1}/README.md +1 -1
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/__init__.py +1 -1
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_core.py +2 -2
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_graphics.py +47 -18
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_gutils.py +18 -13
- easycoder-250222.1/test.ecs +13 -0
- easycoder-250220.1/scripts/test.ecs +0 -14
- {easycoder-250220.1 → easycoder-250222.1}/LICENSE +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/README.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/README.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/empty.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/ends.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/even.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/exists.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/greater.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/includes.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/is.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/less.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/list.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/none.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/not.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/object.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/odd.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/starts.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/conditions/string.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/add.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/append.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/assert.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/begin.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/clear.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/close.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/create.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/debug.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/delete.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/divide.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/exit.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/file.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/fork.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/get.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/go.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/if.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/import.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/increment.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/index.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/init.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/input.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/load.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/lock.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/log.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/module.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/negate.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/open.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/pop.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/post.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/print.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/push.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/put.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/read.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/release.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/replace.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/return.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/run.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/save.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/script.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/set.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/split.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/stack.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/stop.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/system.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/take.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/variable.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/wait.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/while.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/keywords/write.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/arg.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/args.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/cos.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/datime.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/decode.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/element.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/elements.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/empty.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/encode.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/error.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/files.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/float.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/from.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/hash.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/index.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/integer.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/json.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/keys.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/left.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/length.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/lowercase.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/memory.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/modification.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/modulo.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/newline.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/now.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/position.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/property.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/random.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/right.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/sin.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/stringify.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/tab.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/tan.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/timestamp.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/today.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/trim.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/type.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/uppercase.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/value.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/core/values/weekday.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/README.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/doc/graphics/values/window.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/README.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_classes.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_compiler.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_condition.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_handler.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_program.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/easycoder/ec_value.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/json/graphics-demo.json +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/ec_keyboard.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/ec_p100.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/4-function.json +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/4-function.png +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-0.json +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-0.png +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-1.json +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-1.png +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-2.json +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-2.png +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-3.json +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/keyboards/qwerty-3.png +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/plugins/points.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/pyproject.toml +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/README.md +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/benchmark.ecs +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/config.ecg +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/connect.ecg +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/ec_keyboard.py +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/findxr.ecs +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/hello.ecs +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/points.ecs +0 -0
- {easycoder-250220.1 → easycoder-250222.1/scripts}/test.ecs +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/testg.ecg +0 -0
- {easycoder-250220.1 → easycoder-250222.1}/scripts/tests.ecs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250222.1
|
|
4
4
|
Summary: Rapid scripting in English
|
|
5
5
|
Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
|
|
6
6
|
Author-email: Graham Trott <gtanyware@gmail.com>
|
|
@@ -10,7 +10,7 @@ Requires-Dist: pytz
|
|
|
10
10
|
Project-URL: Home, https://github.com/easycoder/easycoder-py
|
|
11
11
|
|
|
12
12
|
# Introduction
|
|
13
|
-
**_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction.
|
|
13
|
+
**_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction. The language is written in Python and it acts as a fairly thin wrapper around standard Python functions, giving fast compilation and good runtime performance for general applications.
|
|
14
14
|
<hr>
|
|
15
15
|
|
|
16
16
|
There is also a JavaScript version of **_EasyCoder_**, which provides a full set of graphical features to run in a browser. For this, please visit
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Introduction
|
|
2
|
-
**_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction.
|
|
2
|
+
**_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction. The language is written in Python and it acts as a fairly thin wrapper around standard Python functions, giving fast compilation and good runtime performance for general applications.
|
|
3
3
|
<hr>
|
|
4
4
|
|
|
5
5
|
There is also a JavaScript version of **_EasyCoder_**, which provides a full set of graphical features to run in a browser. For this, please visit
|
|
@@ -98,29 +98,54 @@ class Graphics(Handler):
|
|
|
98
98
|
def r_column(self, command):
|
|
99
99
|
return self.nextPC()
|
|
100
100
|
|
|
101
|
+
# create layout {name} from {spec}
|
|
101
102
|
# create {window} layout {layout}
|
|
102
|
-
# create {element} {args...}
|
|
103
103
|
def k_create(self, command):
|
|
104
|
-
|
|
104
|
+
token = self.nextToken()
|
|
105
|
+
if token == 'layout':
|
|
106
|
+
if self.nextIsSymbol():
|
|
107
|
+
record = self.getSymbolRecord()
|
|
108
|
+
if record['keyword'] == 'layout':
|
|
109
|
+
command['layout'] = record['name']
|
|
110
|
+
if self.nextIs('from'):
|
|
111
|
+
command['spec'] = self.nextValue()
|
|
112
|
+
self.addCommand(command)
|
|
113
|
+
return True
|
|
114
|
+
elif self.isSymbol():
|
|
105
115
|
symbolRecord = self.getSymbolRecord()
|
|
106
|
-
type = symbolRecord['keyword']
|
|
107
|
-
command['type'] = type
|
|
108
116
|
command['name'] = symbolRecord['name']
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if self.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return True
|
|
117
|
+
command['title'] = self.nextValue()
|
|
118
|
+
if self.nextIs('layout'):
|
|
119
|
+
if self.nextIsSymbol():
|
|
120
|
+
symbolRecord = self.getSymbolRecord()
|
|
121
|
+
if symbolRecord['keyword'] == 'layout':
|
|
122
|
+
command['layout'] = symbolRecord['name']
|
|
123
|
+
self.addCommand(command)
|
|
124
|
+
return True
|
|
118
125
|
return False
|
|
119
126
|
|
|
120
127
|
def r_create(self, command):
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
def processItem(name, item):
|
|
129
|
+
print(name, item['type'])
|
|
130
|
+
children = item['#']
|
|
131
|
+
if isinstance(children, list):
|
|
132
|
+
print("List")
|
|
133
|
+
for child in children:
|
|
134
|
+
print(child)
|
|
135
|
+
else:
|
|
136
|
+
print("Single:", children)
|
|
137
|
+
|
|
138
|
+
if 'spec' in command:
|
|
139
|
+
spec = self.getRuntimeValue(command['spec'])
|
|
140
|
+
layout = self.getVariable(command['layout'])
|
|
141
|
+
for key in spec.keys():
|
|
142
|
+
item = spec[key]
|
|
143
|
+
print(key, item['type'])
|
|
144
|
+
if item['type'] == 'column':
|
|
145
|
+
for child in item['#']: processItem(child, item[child])
|
|
146
|
+
return self.nextPC()
|
|
147
|
+
else:
|
|
148
|
+
record = self.getVariable(command['name'])
|
|
124
149
|
title = self.getRuntimeValue(command['title'])
|
|
125
150
|
layout = self.getVariable(command['layout'])['layout']
|
|
126
151
|
window = psg.Window(title, layout, finalize=True)
|
|
@@ -130,8 +155,12 @@ class Graphics(Handler):
|
|
|
130
155
|
self.program.run(self.nextPC())
|
|
131
156
|
self.mainLoop()
|
|
132
157
|
return 0
|
|
133
|
-
|
|
134
|
-
|
|
158
|
+
|
|
159
|
+
def k_frame(self, command):
|
|
160
|
+
return self.compileVariable(command)
|
|
161
|
+
|
|
162
|
+
def r_frame(self, command):
|
|
163
|
+
return self.nextPC()
|
|
135
164
|
|
|
136
165
|
def k_init(self, command):
|
|
137
166
|
if self.nextIsSymbol():
|
|
@@ -25,6 +25,7 @@ class GUtils:
|
|
|
25
25
|
if type == 'Button': self.getDefaultButton(args)
|
|
26
26
|
elif type == 'Checkbox': self.getDefaultCheckbox(args)
|
|
27
27
|
elif type == 'Column': self.getDefaultColumn(args)
|
|
28
|
+
elif type == 'Frame': self.getDefaultFrame(args)
|
|
28
29
|
elif type == 'Input': self.getDefaultInput(args)
|
|
29
30
|
elif type == 'Listbox': self.getDefaultListbox(args)
|
|
30
31
|
elif type == 'Multiline': self.getDefaultMultiline(args)
|
|
@@ -61,6 +62,7 @@ class GUtils:
|
|
|
61
62
|
if type == 'Button': return self.createButton(layout, args)
|
|
62
63
|
elif type == 'Checkbox': return self.createCheckbox(layout, args)
|
|
63
64
|
elif type == 'Column': return self.createColumn(layout, args)
|
|
65
|
+
elif type == 'Frame': return self.createFrame(layout, args)
|
|
64
66
|
elif type == 'Input': return self.createInput(layout, args)
|
|
65
67
|
elif type == 'Listbox': return self.createListbox(layout, args)
|
|
66
68
|
elif type == 'Multiline': return self.createMultiline(layout, args)
|
|
@@ -74,6 +76,7 @@ class GUtils:
|
|
|
74
76
|
if type(widget) is psg.Button: return widget.get()
|
|
75
77
|
elif type(widget) is psg.Checkbox: return widget.get()
|
|
76
78
|
elif type(widget) is psg.Column: return widget.get()
|
|
79
|
+
elif type(widget) is psg.Frame: return widget.get()
|
|
77
80
|
elif type(widget) is psg.Input: return widget.get()
|
|
78
81
|
elif type(widget) is psg.Listbox:
|
|
79
82
|
items = widget.get()
|
|
@@ -95,13 +98,6 @@ class GUtils:
|
|
|
95
98
|
elif property == 'values':
|
|
96
99
|
element.update(values=value)
|
|
97
100
|
|
|
98
|
-
def getPad(self, args):
|
|
99
|
-
pad = args['pad']
|
|
100
|
-
if pad == (None, None):
|
|
101
|
-
return pad
|
|
102
|
-
pad = pad.split()
|
|
103
|
-
return (pad[0], pad[1])
|
|
104
|
-
|
|
105
101
|
def getSize(self, args):
|
|
106
102
|
size = args['size']
|
|
107
103
|
if size == (None, None):
|
|
@@ -110,7 +106,7 @@ class GUtils:
|
|
|
110
106
|
return (size[0], size[1])
|
|
111
107
|
|
|
112
108
|
def getDefaultButton(self, args):
|
|
113
|
-
args['button_text'] = '
|
|
109
|
+
args['button_text'] = ''
|
|
114
110
|
args['disabled'] = False
|
|
115
111
|
args['size'] = (None, None)
|
|
116
112
|
|
|
@@ -128,10 +124,19 @@ class GUtils:
|
|
|
128
124
|
|
|
129
125
|
def getDefaultColumn(self, args):
|
|
130
126
|
args['expand_x'] = False
|
|
131
|
-
args['pad'] = (
|
|
127
|
+
args['pad'] = (0, 0)
|
|
132
128
|
|
|
133
129
|
def createColumn(self, layout, args):
|
|
134
|
-
return psg.Column(layout, expand_x=args['expand_x'], pad=
|
|
130
|
+
return psg.Column(layout, expand_x=args['expand_x'], pad=args['pad'])
|
|
131
|
+
|
|
132
|
+
def getDefaultFrame(self, args):
|
|
133
|
+
args['title'] = ''
|
|
134
|
+
args['border_width'] = 1
|
|
135
|
+
args['expand_x'] = False
|
|
136
|
+
args['pad'] = (0, 0)
|
|
137
|
+
|
|
138
|
+
def createFrame(self, layout, args):
|
|
139
|
+
return psg.Frame(args['title'], layout, border_width=args['border_width'], expand_x=args['expand_x'], pad=args['pad'])
|
|
135
140
|
|
|
136
141
|
def getDefaultInput(self, args):
|
|
137
142
|
args['default_text'] = ''
|
|
@@ -145,11 +150,11 @@ class GUtils:
|
|
|
145
150
|
args['list'] = []
|
|
146
151
|
args['key'] = [None]
|
|
147
152
|
args['size'] = '10 2'
|
|
148
|
-
args['pad'] =
|
|
153
|
+
args['pad'] = 1
|
|
149
154
|
args['select_mode'] = None
|
|
150
155
|
|
|
151
156
|
def createListbox(self, layout, args):
|
|
152
|
-
return psg.Listbox([], key=args['key'], pad=
|
|
157
|
+
return psg.Listbox([], key=args['key'], pad=args['pad'], size=self.getSize(args))
|
|
153
158
|
|
|
154
159
|
def getDefaultMultiline(self, args):
|
|
155
160
|
args['default_text'] = ''
|
|
@@ -160,7 +165,7 @@ class GUtils:
|
|
|
160
165
|
return psg.Multiline(default_text=args['default_text'], key=args['key'], size=self.getSize(args))
|
|
161
166
|
|
|
162
167
|
def getDefaultText(self, args):
|
|
163
|
-
args['text'] = '
|
|
168
|
+
args['text'] = ''
|
|
164
169
|
args['key'] = None
|
|
165
170
|
args['size'] = (None, None)
|
|
166
171
|
args['expand_x'] = False
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
! A test script
|
|
2
|
-
|
|
3
|
-
script Test
|
|
4
|
-
|
|
5
|
-
variable File
|
|
6
|
-
variable Segment
|
|
7
|
-
|
|
8
|
-
set the encoding to `hex`
|
|
9
|
-
load File from `/data/Projects/rbr/roombyroom/Controller/home/orangepi/firmware/NOW/config.py`
|
|
10
|
-
put left 200 of File into Segment
|
|
11
|
-
print Segment
|
|
12
|
-
put encode Segment into Segment
|
|
13
|
-
print Segment
|
|
14
|
-
exit
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|