easycoder 250506.2__py2.py3-none-any.whl → 250507.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 CHANGED
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "250506.2"
12
+ __version__ = "250507.2"
easycoder/ec_classes.py CHANGED
@@ -8,6 +8,10 @@ class FatalError:
8
8
  print(f'Compile error in {compiler.program.name} at line {lino + 1} ({script}): {message}')
9
9
  sys.exit()
10
10
 
11
+ class NoValueError(FatalError):
12
+ def __init__(self, compiler, record):
13
+ super().__init__(compiler, 'Variable {record["name"]} does not hold a value')
14
+
11
15
  class AssertionError:
12
16
  def __init__(self, program, msg=None):
13
17
  code = program.code[program.pc]
@@ -30,6 +34,10 @@ class RuntimeError:
30
34
  print(f'Runtime Error in {program.name} at line {lino + 1} ({script}): {message}')
31
35
  sys.exit()
32
36
 
37
+ class NoValueRuntimeError(RuntimeError):
38
+ def __init__(self, program, record):
39
+ super().__init__(program, 'Variable {record["name"]} does not hold a value')
40
+
33
41
  class RuntimeWarning:
34
42
  def __init__(self, program, message):
35
43
  if program == None:
easycoder/ec_core.py CHANGED
@@ -2,7 +2,7 @@ import json, math, hashlib, threading, os, subprocess, sys, requests, time, numb
2
2
  from psutil import Process
3
3
  from datetime import datetime, timezone
4
4
  from random import randrange
5
- from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, Condition, Object
5
+ from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Condition, Object
6
6
  from .ec_handler import Handler
7
7
  from .ec_timestamp import getTimestamp
8
8
 
@@ -94,7 +94,7 @@ class Core(Handler):
94
94
  command['target'] = symbolRecord['name']
95
95
  self.add(command)
96
96
  return True
97
- self.warning(f'Core.append: Variable "{symbolRecord["name"]}" does not hold a value')
97
+ self.warning(f'Core.append: Variable {symbolRecord["name"]} does not hold a value')
98
98
  return False
99
99
 
100
100
  def r_append(self, command):
@@ -251,7 +251,7 @@ class Core(Handler):
251
251
  command['target'] = self.getToken()
252
252
  self.add(command)
253
253
  return True
254
- self.warning(f'Core.decrement: Variable "{symbolRecord["name"]}" does not hold a value')
254
+ self.warning(f'Core.decrement: Variable {symbolRecord["name"]} does not hold a value')
255
255
  return False
256
256
 
257
257
  def r_decrement(self, command):
@@ -277,7 +277,7 @@ class Core(Handler):
277
277
  command['var'] = record['name']
278
278
  self.add(command)
279
279
  return True
280
- FatalError(self.compiler, f'Variable {record['name']} does not hold a value')
280
+ NoValueError(self.compiler, record)
281
281
  self.warning(f'Core.delete: variable expected; got {self.getToken()}')
282
282
  else:
283
283
  self.warning(f'Core.delete: "file", "property" or "element" expected; got {token}')
@@ -418,7 +418,7 @@ class Core(Handler):
418
418
  if symbolRecord['hasValue']:
419
419
  command['target'] = self.getToken()
420
420
  else:
421
- FatalError(self.compiler, f'Variable "{symbolRecord["name"]}" does not hold a value')
421
+ NoValueError(self.compiler, symbolRecord)
422
422
  if self.nextIs('from'):
423
423
  if self.nextIs('url'):
424
424
  url = self.nextValue()
@@ -629,7 +629,7 @@ class Core(Handler):
629
629
  command['target'] = self.getToken()
630
630
  self.add(command)
631
631
  return True
632
- self.warning(f'Core.increment: Variable "{symbolRecord["name"]}" does not hold a value')
632
+ self.warning(f'Core.increment: Variable {symbolRecord["name"]} does not hold a value')
633
633
  return False
634
634
 
635
635
  def r_increment(self, command):
@@ -829,13 +829,13 @@ class Core(Handler):
829
829
  command['target'] = self.getToken()
830
830
  self.add(command)
831
831
  return True
832
- self.warning(f'Core.negate: Variable "{symbolRecord["name"]}" does not hold a value')
832
+ self.warning(f'Core.negate: Variable {symbolRecord["name"]} does not hold a value')
833
833
  return False
834
834
 
835
835
  def r_negate(self, command):
836
836
  symbolRecord = self.getVariable(command['target'])
837
837
  if not symbolRecord['hasValue']:
838
- RuntimeError(self.program, f'{symbolRecord["name"]} does not hold a value')
838
+ NoValueRuntimeError(self.program, symbolRecord)
839
839
  return None
840
840
  value = self.getSymbolValue(symbolRecord)
841
841
  if value == None:
@@ -937,7 +937,7 @@ class Core(Handler):
937
937
  def r_pop(self, command):
938
938
  symbolRecord = self.getVariable(command['target'])
939
939
  if not symbolRecord['hasValue']:
940
- RuntimeError(self.program, f'{symbolRecord["name"]} does not hold a value')
940
+ NoValueRuntimeError(self.program, symbolRecord)
941
941
  stackRecord = self.getVariable(command['from'])
942
942
  stack = self.getSymbolValue(stackRecord)
943
943
  v = stack.pop()
@@ -1091,7 +1091,7 @@ class Core(Handler):
1091
1091
  return -1
1092
1092
  symbolRecord = self.getVariable(command['target'])
1093
1093
  if not symbolRecord['hasValue']:
1094
- RuntimeError(self.program, f'{symbolRecord["name"]} does not hold a value')
1094
+ NoValueRuntimeError(self.program, symbolRecord)
1095
1095
  return -1
1096
1096
  self.putSymbolValue(symbolRecord, value)
1097
1097
  return self.nextPC()
@@ -1406,13 +1406,13 @@ class Core(Handler):
1406
1406
  command['target'] = self.getToken()
1407
1407
  self.add(command)
1408
1408
  return True
1409
- self.warning(f'Core.negate: Variable "{symbolRecord["name"]}" does not hold a value')
1409
+ self.warning(f'Core.negate: Variable {symbolRecord["name"]} does not hold a value')
1410
1410
  return False
1411
1411
 
1412
1412
  def r_shuffle(self, command):
1413
1413
  symbolRecord = self.getVariable(command['target'])
1414
1414
  if not symbolRecord['hasValue']:
1415
- RuntimeError(self.program, f'{symbolRecord["name"]} does not hold a value')
1415
+ NoValueRuntimeError(self.program, symbolRecord)
1416
1416
  return None
1417
1417
  value = self.getSymbolValue(symbolRecord)
1418
1418
  if value == None:
@@ -1735,7 +1735,7 @@ class Core(Handler):
1735
1735
  def incdec(self, command, mode):
1736
1736
  symbolRecord = self.getVariable(command['target'])
1737
1737
  if not symbolRecord['hasValue']:
1738
- RuntimeError(self.program, f'{symbolRecord["name"]} does not hold a value')
1738
+ NoValueRuntimeError(self.program, symbolRecord)
1739
1739
  value = self.getSymbolValue(symbolRecord)
1740
1740
  if value == None:
1741
1741
  RuntimeError(self.program, f'{symbolRecord["name"]} has not been initialised')
@@ -1805,7 +1805,7 @@ class Core(Handler):
1805
1805
  if symbolRecord['hasValue']:
1806
1806
  value['target'] = symbolRecord['name']
1807
1807
  return value
1808
- self.warning(f'Core.compileValue: Token \'{self.getToken()}\' does not hold a value')
1808
+ self.warning(f'Core.compileValue: Token {symbolRecord["name"]} does not hold a value')
1809
1809
  return None
1810
1810
 
1811
1811
  if token == 'property':
@@ -1816,7 +1816,7 @@ class Core(Handler):
1816
1816
  if symbolRecord['hasValue']:
1817
1817
  value['target'] = symbolRecord['name']
1818
1818
  return value
1819
- FatalError(self.compiler, 'Variable does not hold a value')
1819
+ NoValueError(self.compiler, symbolRecord)
1820
1820
  return None
1821
1821
 
1822
1822
  if token == 'arg':
easycoder/ec_pyside.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import sys
2
- from easycoder import Handler, FatalError, RuntimeError
2
+ from easycoder import Handler, RuntimeError
3
3
  from PySide6.QtCore import Qt, QTimer
4
4
  from PySide6.QtGui import QPixmap
5
5
  from PySide6.QtWidgets import (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easycoder
3
- Version: 250506.2
3
+ Version: 250507.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,18 +1,18 @@
1
1
  easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
2
- easycoder/__init__.py,sha256=Z5F6fV2l9QLLAjRmuwPybN1yPsS8bYW3iW7SLCO5es0,262
3
- easycoder/ec_classes.py,sha256=xnWBNak8oKydkFoxHLlq9wo3lIsB3aMnTDrqbtCfoWo,1512
2
+ easycoder/__init__.py,sha256=WpFbBsCwgKo_YtxdiGTJBFGo0pQSxuxrr36qIqH1tfg,262
3
+ easycoder/ec_classes.py,sha256=L6-6yWHDHw8yF9TGL4WWc4p1aUyXzYz6Gom7jJ43h8o,1823
4
4
  easycoder/ec_compiler.py,sha256=vNOAKIK2pX_cW4mcxwCe0OR16iqeZqvZQ6JCgQ5MqtU,5062
5
5
  easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
6
- easycoder/ec_core.py,sha256=U5PIYmQNhA3QF2tlQ8luX83Aqio8sdqzXZCGI1hiSeY,92221
6
+ easycoder/ec_core.py,sha256=SX2tXGgQ1aJr8cyb8NZ3ESgnr57G1e0wLDwkJbo3C5E,92003
7
7
  easycoder/ec_graphics.py,sha256=WXxKMB4GJSmxvk-FVbOTyufiUx4TYIzyDoB1PCAO3JY,16067
8
8
  easycoder/ec_gutils.py,sha256=yqu4RRQ6VdRkC5B2ADBYsXzgNu76dLnekd9aUjdEgPw,6399
9
9
  easycoder/ec_handler.py,sha256=zPDZ_hqdgNnkCd8B5HmSLkqsGgf4aDmqcUBOPHgo47U,2305
10
10
  easycoder/ec_program.py,sha256=uv2F0Gu9ZJSW2Pb4IitUtq0xb4e_gU8emMYyIRLoS24,10064
11
- easycoder/ec_pyside.py,sha256=HBLYZJrumuud9aYkEk65iCs8VqLBFF0S9XtKn-0VHes,37035
11
+ easycoder/ec_pyside.py,sha256=N-sHBWIZ-rcFVcwMbqiRbU0IJO9Hpum4jZxeh8L_wvE,37023
12
12
  easycoder/ec_timestamp.py,sha256=_3QFJPzIWZ9Rzk3SQOQJ-gwmvB07pg78k23SPntoZtY,288
13
13
  easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
14
- easycoder-250506.2.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
15
- easycoder-250506.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
- easycoder-250506.2.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
17
- easycoder-250506.2.dist-info/METADATA,sha256=Tchcd3tR3kNM4W2toVAQNGin6wPZaZy8WhpRcSezg70,6827
18
- easycoder-250506.2.dist-info/RECORD,,
14
+ easycoder-250507.2.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
15
+ easycoder-250507.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
+ easycoder-250507.2.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
17
+ easycoder-250507.2.dist-info/METADATA,sha256=GKyDutAMP9SYRXE7L31feefIhD96oSCgg3ZjoLC-6uc,6827
18
+ easycoder-250507.2.dist-info/RECORD,,