easycoder 250825.1__py2.py3-none-any.whl → 250826.2__py2.py3-none-any.whl
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/__init__.py +1 -1
- easycoder/ec_handler.py +1 -0
- easycoder/ec_program.py +5 -0
- easycoder/ec_pyside.py +29 -18
- {easycoder-250825.1.dist-info → easycoder-250826.2.dist-info}/METADATA +1 -1
- {easycoder-250825.1.dist-info → easycoder-250826.2.dist-info}/RECORD +9 -9
- {easycoder-250825.1.dist-info → easycoder-250826.2.dist-info}/WHEEL +0 -0
- {easycoder-250825.1.dist-info → easycoder-250826.2.dist-info}/entry_points.txt +0 -0
- {easycoder-250825.1.dist-info → easycoder-250826.2.dist-info}/licenses/LICENSE +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_handler.py
CHANGED
|
@@ -36,6 +36,7 @@ class Handler:
|
|
|
36
36
|
self.testCondition = self.program.condition.testCondition
|
|
37
37
|
self.symbols = self.program.symbols
|
|
38
38
|
self.stack = self.program.stack
|
|
39
|
+
self.getSymbolContent = self.program.getSymbolContent
|
|
39
40
|
self.getSymbolValue = self.program.getSymbolValue
|
|
40
41
|
self.putSymbolValue = self.program.putSymbolValue
|
|
41
42
|
self.run = self.program.run
|
easycoder/ec_program.py
CHANGED
|
@@ -197,6 +197,11 @@ class Program:
|
|
|
197
197
|
return ''
|
|
198
198
|
return None
|
|
199
199
|
|
|
200
|
+
def getSymbolContent(self, symbolRecord):
|
|
201
|
+
if len(symbolRecord['value']) == 0:
|
|
202
|
+
return None
|
|
203
|
+
return symbolRecord['value'][symbolRecord['index']]
|
|
204
|
+
|
|
200
205
|
def getSymbolValue(self, symbolRecord):
|
|
201
206
|
if len(symbolRecord['value']) == 0:
|
|
202
207
|
return None
|
easycoder/ec_pyside.py
CHANGED
|
@@ -70,6 +70,10 @@ class Graphics(Handler):
|
|
|
70
70
|
|
|
71
71
|
def dialogTypes(self):
|
|
72
72
|
return ['confirm', 'lineedit', 'multiline', 'generic']
|
|
73
|
+
|
|
74
|
+
def getWidget(self, record):
|
|
75
|
+
if record['keyword'] in ['pushbutton']: return self.getSymbolContent(record)
|
|
76
|
+
else: return record['widget']
|
|
73
77
|
|
|
74
78
|
class ClickableLineEdit(QLineEdit):
|
|
75
79
|
clicked = Signal()
|
|
@@ -200,13 +204,13 @@ class Graphics(Handler):
|
|
|
200
204
|
layoutRecord = self.getVariable(command['layout'])
|
|
201
205
|
widget = command['widget']
|
|
202
206
|
if widget == 'stretch':
|
|
203
|
-
layoutRecord
|
|
207
|
+
self.getWidget(layoutRecord).addStretch()
|
|
204
208
|
elif widget == 'spacer':
|
|
205
|
-
layoutRecord
|
|
209
|
+
self.getWidget(layoutRecord).addSpacing(self.getRuntimeValue(command['size']))
|
|
206
210
|
else:
|
|
207
211
|
widgetRecord = self.getVariable(widget)
|
|
208
212
|
layoutRecord = self.getVariable(command['layout'])
|
|
209
|
-
widget = widgetRecord
|
|
213
|
+
widget = self.getWidget(widgetRecord)
|
|
210
214
|
layout = layoutRecord['widget']
|
|
211
215
|
stretch = 'stretch' in command
|
|
212
216
|
if widgetRecord['keyword'] == 'layout':
|
|
@@ -569,7 +573,6 @@ class Graphics(Handler):
|
|
|
569
573
|
w = fm.horizontalAdvance('m') * self.getRuntimeValue(command['size']) + c.left()+c.right()
|
|
570
574
|
pushbutton.setMaximumWidth(w)
|
|
571
575
|
self.putSymbolValue(record, pushbutton)
|
|
572
|
-
record['widget'] = pushbutton
|
|
573
576
|
return self.nextPC()
|
|
574
577
|
|
|
575
578
|
def r_createCheckBox(self, command, record):
|
|
@@ -730,7 +733,7 @@ class Graphics(Handler):
|
|
|
730
733
|
return False
|
|
731
734
|
|
|
732
735
|
def r_disable(self, command):
|
|
733
|
-
self.getVariable(command['name'])
|
|
736
|
+
self.getWidget(self.getVariable(command['name'])).setEnabled(False)
|
|
734
737
|
return self.nextPC()
|
|
735
738
|
|
|
736
739
|
# Enable a widget
|
|
@@ -742,7 +745,7 @@ class Graphics(Handler):
|
|
|
742
745
|
return False
|
|
743
746
|
|
|
744
747
|
def r_enable(self, command):
|
|
745
|
-
self.getVariable(command['name'])
|
|
748
|
+
self.getWidget(self.getVariable(command['name'])).setEnabled(True)
|
|
746
749
|
return self.nextPC()
|
|
747
750
|
|
|
748
751
|
# Create a group box
|
|
@@ -881,18 +884,21 @@ class Graphics(Handler):
|
|
|
881
884
|
return False
|
|
882
885
|
|
|
883
886
|
def r_on(self, command):
|
|
884
|
-
def run(widget):
|
|
885
|
-
|
|
886
|
-
|
|
887
|
+
def run(widget, record):
|
|
888
|
+
for i, w in enumerate(record['value']):
|
|
889
|
+
if w == widget:
|
|
890
|
+
record['index'] = i
|
|
891
|
+
self.run(command['goto'])
|
|
892
|
+
return
|
|
887
893
|
|
|
888
894
|
if command['type'] == 'tick':
|
|
889
895
|
self.runOnTick = command['runOnTick']
|
|
890
896
|
else:
|
|
891
897
|
record = self.getVariable(command['name'])
|
|
892
|
-
widget = record
|
|
898
|
+
widget = self.getWidget(record)
|
|
893
899
|
keyword = record['keyword']
|
|
894
900
|
if keyword == 'pushbutton':
|
|
895
|
-
handler = partial(run, widget)
|
|
901
|
+
handler = partial(run, widget, record)
|
|
896
902
|
widget.clicked.connect(handler)
|
|
897
903
|
elif keyword == 'combobox':
|
|
898
904
|
widget.currentIndexChanged.connect(lambda: self.run(command['goto']))
|
|
@@ -1124,7 +1130,7 @@ class Graphics(Handler):
|
|
|
1124
1130
|
record = self.getVariable(command['name'])
|
|
1125
1131
|
keyword = record['keyword']
|
|
1126
1132
|
if keyword == 'window':
|
|
1127
|
-
window = record['
|
|
1133
|
+
window = record['window']
|
|
1128
1134
|
container = QWidget()
|
|
1129
1135
|
container.setLayout(content)
|
|
1130
1136
|
window.setCentralWidget(container)
|
|
@@ -1135,7 +1141,8 @@ class Graphics(Handler):
|
|
|
1135
1141
|
layout = self.getVariable(command['name'])['widget']
|
|
1136
1142
|
layout.setSpacing(self.getRuntimeValue(command['value']))
|
|
1137
1143
|
elif what == 'text':
|
|
1138
|
-
|
|
1144
|
+
record = self.getVariable(command['name'])
|
|
1145
|
+
widget = self.getWidget(record)
|
|
1139
1146
|
text = self.getRuntimeValue(command['value'])
|
|
1140
1147
|
keyword = record['keyword']
|
|
1141
1148
|
setText = getattr(widget, "setText", None)
|
|
@@ -1164,19 +1171,23 @@ class Graphics(Handler):
|
|
|
1164
1171
|
elif flag == 'center': alignment |= Qt.AlignCenter
|
|
1165
1172
|
widget.setAlignment(alignment)
|
|
1166
1173
|
elif what == 'style':
|
|
1167
|
-
|
|
1174
|
+
record = self.getVariable(command['name'])
|
|
1175
|
+
widget = self.getWidget(record)
|
|
1168
1176
|
styles = self.getRuntimeValue(command['value'])
|
|
1169
1177
|
widget.setStyleSheet(styles)
|
|
1170
1178
|
elif what == 'color':
|
|
1171
|
-
|
|
1179
|
+
record = self.getVariable(command['name'])
|
|
1180
|
+
widget = self.getWidget(record)
|
|
1172
1181
|
color = self.getRuntimeValue(command['value'])
|
|
1173
1182
|
widget.setStyleSheet(f"color: {color};")
|
|
1174
1183
|
elif what == 'background-color':
|
|
1175
|
-
|
|
1184
|
+
record = self.getVariable(command['name'])
|
|
1185
|
+
widget = self.getWidget(record)
|
|
1176
1186
|
bg_color = self.getRuntimeValue(command['value'])
|
|
1177
1187
|
widget.setStyleSheet(f"background-color: {bg_color};")
|
|
1178
1188
|
elif what == 'listbox':
|
|
1179
|
-
|
|
1189
|
+
record = self.getVariable(command['name'])
|
|
1190
|
+
widget = self.getWidget(record)
|
|
1180
1191
|
value = self.getRuntimeValue(command['value'])
|
|
1181
1192
|
widget.clear()
|
|
1182
1193
|
widget.addItems(value)
|
|
@@ -1351,7 +1362,7 @@ class Graphics(Handler):
|
|
|
1351
1362
|
symbolRecord = self.getVariable(symbolRecord['name'])
|
|
1352
1363
|
keyword = symbolRecord['keyword']
|
|
1353
1364
|
if keyword == 'pushbutton':
|
|
1354
|
-
pushbutton = symbolRecord['widget']
|
|
1365
|
+
pushbutton = self.getSymbolContent(symbolRecord) # symbolRecord['widget']
|
|
1355
1366
|
v = {}
|
|
1356
1367
|
v['type'] = 'text'
|
|
1357
1368
|
v['content'] = pushbutton.accessibleName()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250826.2
|
|
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>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
easycoder/__init__.py,sha256=
|
|
1
|
+
easycoder/__init__.py,sha256=UtclhKbGdjMumFBAT_zAsSck8VnFGCK4NPb1ZcBqMdE,339
|
|
2
2
|
easycoder/close.png,sha256=3B9ueRNtEu9E4QNmZhdyC4VL6uqKvGmdfeFxIV9aO_Y,9847
|
|
3
3
|
easycoder/ec_border.py,sha256=KpOy0Jq8jI_6DYGo4jaFvoBP_jTIoAYWrmuHhl-FXA4,2355
|
|
4
4
|
easycoder/ec_classes.py,sha256=bejrby7mLHTeAQXhhz-1l8iv6LSbNSy30lW21KJKjXE,1832
|
|
5
5
|
easycoder/ec_compiler.py,sha256=zImpvvSEfHRGe5MiIgmiu2i7rJxsB4pVLujqmHaOqTo,5392
|
|
6
6
|
easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
|
|
7
7
|
easycoder/ec_core.py,sha256=s7Ovz6iTjlMqVk-tmsnOH-EEECHxsudgUF1EAlIsOZ4,98044
|
|
8
|
-
easycoder/ec_handler.py,sha256=
|
|
8
|
+
easycoder/ec_handler.py,sha256=ED08ULiOlZkcs4XHxAguvdPZw_dFXuwGDFLbFuo0kLs,2317
|
|
9
9
|
easycoder/ec_keyboard.py,sha256=ru-HdWolBMZJPyck2s72In9tXFeLJQSPtR1TpjmIo90,18350
|
|
10
|
-
easycoder/ec_program.py,sha256=
|
|
11
|
-
easycoder/ec_pyside.py,sha256=
|
|
10
|
+
easycoder/ec_program.py,sha256=3KM9n_SAChUgUnRxhPCnA75K2FP1fgxjW8z1YUA3cL4,10140
|
|
11
|
+
easycoder/ec_pyside.py,sha256=m_xyuE3GR-vjPdsrp5bmHmZ_KePRlMgXF6gW9zKeFzo,54080
|
|
12
12
|
easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
|
|
13
13
|
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
14
14
|
easycoder/tick.png,sha256=OedASXJJTYvnza4J6Kv5m5lz6DrBfy667zX_WGgtbmM,9127
|
|
15
|
-
easycoder-
|
|
16
|
-
easycoder-
|
|
17
|
-
easycoder-
|
|
18
|
-
easycoder-
|
|
19
|
-
easycoder-
|
|
15
|
+
easycoder-250826.2.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
16
|
+
easycoder-250826.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
17
|
+
easycoder-250826.2.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
|
|
18
|
+
easycoder-250826.2.dist-info/METADATA,sha256=0-hj10IUXVcvGCF9KY-hnxcfOrHIDGPJ33JaJDx2Po8,6897
|
|
19
|
+
easycoder-250826.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|