easycoder 251018.1__py2.py3-none-any.whl → 251022.1__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_classes.py +0 -4
- easycoder/ec_condition.py +1 -1
- easycoder/ec_core.py +5 -3
- easycoder/ec_pyside.py +40 -5
- {easycoder-251018.1.dist-info → easycoder-251022.1.dist-info}/METADATA +1 -1
- {easycoder-251018.1.dist-info → easycoder-251022.1.dist-info}/RECORD +10 -10
- {easycoder-251018.1.dist-info → easycoder-251022.1.dist-info}/WHEEL +0 -0
- {easycoder-251018.1.dist-info → easycoder-251022.1.dist-info}/entry_points.txt +0 -0
- {easycoder-251018.1.dist-info → easycoder-251022.1.dist-info}/licenses/LICENSE +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_classes.py
CHANGED
|
@@ -16,7 +16,6 @@ class AssertionError:
|
|
|
16
16
|
def __init__(self, program, msg=None):
|
|
17
17
|
code = program.code[program.pc]
|
|
18
18
|
lino = code['lino']
|
|
19
|
-
script = program.script.lines[lino].strip()
|
|
20
19
|
message = f'Assertion Error in {program.name} at line {lino + 1}'
|
|
21
20
|
if msg != None:
|
|
22
21
|
message += f': {msg}'
|
|
@@ -58,8 +57,5 @@ class Token:
|
|
|
58
57
|
self.lino = lino
|
|
59
58
|
self.token = token
|
|
60
59
|
|
|
61
|
-
class Condition():
|
|
62
|
-
negate = False
|
|
63
|
-
|
|
64
60
|
class Object():
|
|
65
61
|
pass
|
easycoder/ec_condition.py
CHANGED
easycoder/ec_core.py
CHANGED
|
@@ -3,7 +3,7 @@ import numbers, base64, binascii, random, requests, paramiko
|
|
|
3
3
|
from copy import deepcopy
|
|
4
4
|
from psutil import Process
|
|
5
5
|
from datetime import datetime
|
|
6
|
-
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError,
|
|
6
|
+
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Object
|
|
7
7
|
from .ec_handler import Handler
|
|
8
8
|
from .ec_timestamp import getTimestamp
|
|
9
9
|
|
|
@@ -323,7 +323,8 @@ class Core(Handler):
|
|
|
323
323
|
symbolRecord = self.getVariable(command['var'])
|
|
324
324
|
value = self.getSymbolValue(symbolRecord)
|
|
325
325
|
content = value['content']
|
|
326
|
-
content
|
|
326
|
+
if key >= 0 and key < len(content): del(content[key])
|
|
327
|
+
else: RuntimeError(self.program, f'Index {key} out of range')
|
|
327
328
|
value['content'] = content
|
|
328
329
|
self.putSymbolValue(symbolRecord, value)
|
|
329
330
|
return self.nextPC()
|
|
@@ -2631,7 +2632,8 @@ class Core(Handler):
|
|
|
2631
2632
|
#############################################################################
|
|
2632
2633
|
# Compile a condition
|
|
2633
2634
|
def compileCondition(self):
|
|
2634
|
-
condition =
|
|
2635
|
+
condition = Object()
|
|
2636
|
+
condition.negate = False
|
|
2635
2637
|
|
|
2636
2638
|
token = self.getToken()
|
|
2637
2639
|
|
easycoder/ec_pyside.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
from functools import partial
|
|
3
3
|
from .ec_handler import Handler
|
|
4
|
-
from .ec_classes import RuntimeError
|
|
4
|
+
from .ec_classes import RuntimeError, Object
|
|
5
5
|
from .ec_border import Border
|
|
6
6
|
from PySide6.QtCore import Qt, QTimer, Signal, QRect
|
|
7
7
|
from PySide6.QtGui import QPixmap, QPainter
|
|
@@ -26,6 +26,7 @@ from PySide6.QtWidgets import (
|
|
|
26
26
|
QSlider,
|
|
27
27
|
QSpinBox,
|
|
28
28
|
QTimeEdit,
|
|
29
|
+
QLayout,
|
|
29
30
|
QVBoxLayout,
|
|
30
31
|
QHBoxLayout,
|
|
31
32
|
QGridLayout,
|
|
@@ -281,8 +282,41 @@ class Graphics(Handler):
|
|
|
281
282
|
return False
|
|
282
283
|
|
|
283
284
|
def r_clear(self, command):
|
|
285
|
+
|
|
286
|
+
def clearLayout(layout: QLayout) -> None:
|
|
287
|
+
if layout is None:
|
|
288
|
+
return
|
|
289
|
+
while layout.count() > 0:
|
|
290
|
+
item = layout.takeAt(0)
|
|
291
|
+
if item is None:
|
|
292
|
+
continue
|
|
293
|
+
widget = item.widget()
|
|
294
|
+
if widget is not None:
|
|
295
|
+
# Delete the widget
|
|
296
|
+
widget.deleteLater()
|
|
297
|
+
elif item.layout() is not None:
|
|
298
|
+
# Recursively clear sub-layout
|
|
299
|
+
clearLayout(item.layout())
|
|
300
|
+
item.layout().deleteLater()
|
|
301
|
+
# The QLayoutItem will be automatically cleaned up by Qt
|
|
302
|
+
|
|
303
|
+
def clearWidget(widget: QWidget) -> None:
|
|
304
|
+
if widget is None:
|
|
305
|
+
return
|
|
306
|
+
# Clear the layout first
|
|
307
|
+
layout = widget.layout()
|
|
308
|
+
if layout is not None:
|
|
309
|
+
clearLayout(layout)
|
|
310
|
+
layout.deleteLater()
|
|
311
|
+
# Clear any remaining child widgets
|
|
312
|
+
child_widgets = widget.findChildren(QWidget, "", Qt.FindDirectChildrenOnly)
|
|
313
|
+
for child in child_widgets:
|
|
314
|
+
child.deleteLater()
|
|
315
|
+
|
|
284
316
|
widget = self.getWidget(self.getVariable(command['name']))
|
|
285
|
-
widget
|
|
317
|
+
clearWidget(widget)
|
|
318
|
+
return self.nextPC()
|
|
319
|
+
|
|
286
320
|
return self.nextPC()
|
|
287
321
|
|
|
288
322
|
# close {window}
|
|
@@ -1481,8 +1515,9 @@ class Graphics(Handler):
|
|
|
1481
1515
|
#############################################################################
|
|
1482
1516
|
# Compile a condition
|
|
1483
1517
|
def compileCondition(self):
|
|
1484
|
-
condition =
|
|
1485
|
-
|
|
1518
|
+
condition = Object()
|
|
1519
|
+
condition.negate = False
|
|
1520
|
+
return None
|
|
1486
1521
|
|
|
1487
1522
|
#############################################################################
|
|
1488
1523
|
# Condition handlers
|
|
@@ -1491,4 +1526,4 @@ class Graphics(Handler):
|
|
|
1491
1526
|
# Force the application to exit
|
|
1492
1527
|
def force_exit(self):
|
|
1493
1528
|
QApplication.quit() # Gracefully close the application
|
|
1494
|
-
sys.exit(0) # Force a complete system exit
|
|
1529
|
+
sys.exit(0) # Force a complete system exit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 251022.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>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
easycoder/__init__.py,sha256=
|
|
1
|
+
easycoder/__init__.py,sha256=zYNtmGgE9VSJRidp6nmtn8IRiTq42VRwGw45dQscGlI,339
|
|
2
2
|
easycoder/close.png,sha256=3B9ueRNtEu9E4QNmZhdyC4VL6uqKvGmdfeFxIV9aO_Y,9847
|
|
3
3
|
easycoder/ec_border.py,sha256=KpOy0Jq8jI_6DYGo4jaFvoBP_jTIoAYWrmuHhl-FXA4,2355
|
|
4
|
-
easycoder/ec_classes.py,sha256=
|
|
4
|
+
easycoder/ec_classes.py,sha256=YGUiKnVN6T5scoeBmmGDQAtE8xJgaTHi0Exh9A7H2Y4,1750
|
|
5
5
|
easycoder/ec_compiler.py,sha256=LYwGNs8dcHKXI_nnu1sVFe1N36vjvylcUO_tX_bLjrk,5359
|
|
6
|
-
easycoder/ec_condition.py,sha256=
|
|
7
|
-
easycoder/ec_core.py,sha256=
|
|
6
|
+
easycoder/ec_condition.py,sha256=uamZrlW3Ej3R4bPDuduGB2f00M80Z1D0qV8muDx4Qfw,784
|
|
7
|
+
easycoder/ec_core.py,sha256=nrhUCbvf1_QTK_kpY1uKnnrXOgsJaehkguWyqwPW44Q,99777
|
|
8
8
|
easycoder/ec_handler.py,sha256=ED08ULiOlZkcs4XHxAguvdPZw_dFXuwGDFLbFuo0kLs,2317
|
|
9
9
|
easycoder/ec_keyboard.py,sha256=H8DhPT8-IvAIGgRxCs4qSaF_AQLaS6lxxtDteejbktM,19010
|
|
10
10
|
easycoder/ec_program.py,sha256=srVDRlELMElvnkjxmREczUVPkvPXPvanZglN4hKreLI,10324
|
|
11
|
-
easycoder/ec_pyside.py,sha256=
|
|
11
|
+
easycoder/ec_pyside.py,sha256=78jtkiwna8c2gYhH33fOtxboENQ-jWmMR0WdB--nnXg,57518
|
|
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-251022.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
16
|
+
easycoder-251022.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
17
|
+
easycoder-251022.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
|
|
18
|
+
easycoder-251022.1.dist-info/METADATA,sha256=yKWSZAuntq9BmMkNJcczTU1z72XHiAB5AGauJmZ3En8,6897
|
|
19
|
+
easycoder-251022.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|