easycoder 250725.2__py2.py3-none-any.whl → 250726.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 CHANGED
@@ -11,4 +11,4 @@ from .ec_pyside import *
11
11
  from .ec_timestamp import *
12
12
  from .ec_value import *
13
13
 
14
- __version__ = "250725.2"
14
+ __version__ = "250726.1"
easycoder/ec_compiler.py CHANGED
@@ -82,7 +82,7 @@ class Compiler:
82
82
  self.code.append(command)
83
83
 
84
84
  def isSymbol(self):
85
- token=self.getToken()
85
+ token = self.getToken()
86
86
  try:
87
87
  self.symbols[token]
88
88
  except:
easycoder/ec_pyside.py CHANGED
@@ -73,34 +73,44 @@ class Graphics(Handler):
73
73
  # (2) add {widget} to {layout}
74
74
  # (3) add stretch {widget} to {layout}
75
75
  # (4) add stretch to {layout}
76
+ # (5) add spacer {size} to {layout}
76
77
  def k_add(self, command):
77
78
  def addToLayout():
78
79
  if self.nextIsSymbol():
79
80
  record = self.getSymbolRecord()
80
- command['layout'] = record['name']
81
- self.add(command)
82
- return True
81
+ if record['keyword'] in ['layout', 'groupbox', 'element']:
82
+ command['layout'] = record['name']
83
+ self.add(command)
84
+ return True
83
85
  return False
84
-
85
- command['stretch'] = False
86
- if self.nextIs('stretch'):
87
- # It's either (3) or (4)
86
+
87
+ token = self.peek()
88
+ if token == 'stretch':
88
89
  self.nextToken()
89
- if self.tokenIs('to'):
90
+ # It's either (3) or (4)
91
+ if self.nextIs('to'):
90
92
  # (4)
93
+ command['stretch'] = False
91
94
  command['widget'] = 'stretch'
92
95
  return addToLayout()
93
- # (3)
94
96
  if self.isSymbol():
97
+ # (3)
95
98
  record = self.getSymbolRecord()
96
99
  command['widget'] = record['name']
97
100
  command['stretch'] = True
98
101
  if self.nextIs('to'):
99
102
  return addToLayout()
100
103
  return False
104
+
105
+ elif token == 'spacer':
106
+ self.nextToken()
107
+ command['widget'] = 'spacer'
108
+ command['size'] = self.nextValue()
109
+ self.skip('to')
110
+ return addToLayout()
101
111
 
102
112
  # Here it's either (1) or (2)
103
- elif self.isSymbol():
113
+ elif self.nextIsSymbol():
104
114
  record = self.getSymbolRecord()
105
115
  if record['extra'] == 'gui':
106
116
  if self.isWidget(record['keyword']):
@@ -134,12 +144,14 @@ class Graphics(Handler):
134
144
  widget = command['widget']
135
145
  if widget == 'stretch':
136
146
  layoutRecord['widget'].addStretch()
147
+ elif widget == 'spacer':
148
+ layoutRecord['widget'].addSpacing(self.getRuntimeValue(command['size']))
137
149
  else:
138
150
  widgetRecord = self.getVariable(widget)
139
151
  layoutRecord = self.getVariable(command['layout'])
140
152
  widget = widgetRecord['widget']
141
153
  layout = layoutRecord['widget']
142
- stretch = command['stretch']
154
+ stretch = 'stretch' in command
143
155
  if widgetRecord['keyword'] == 'layout':
144
156
  if layoutRecord['keyword'] == 'groupbox':
145
157
  if widgetRecord['keyword'] == 'layout':
@@ -432,7 +444,7 @@ class Graphics(Handler):
432
444
  return self.nextPC()
433
445
 
434
446
  def r_createLabel(self, command, record):
435
- label = QLabel(self.getRuntimeValue(command['text']))
447
+ label = QLabel(str(self.getRuntimeValue(command['text'])))
436
448
  if 'size' in command:
437
449
  fm = label.fontMetrics()
438
450
  c = label.contentsMargins()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easycoder
3
- Version: 250725.2
3
+ Version: 250726.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,17 +1,17 @@
1
- easycoder/__init__.py,sha256=vixcpJTv1hLHdoBiE07oy050hA9EzmJHefF2D-JICuk,314
1
+ easycoder/__init__.py,sha256=lARJ2ZxGdrgoignMg07UCQd-fYIqY6GZwr-b_Dk-EP0,314
2
2
  easycoder/close.png,sha256=3B9ueRNtEu9E4QNmZhdyC4VL6uqKvGmdfeFxIV9aO_Y,9847
3
3
  easycoder/ec_classes.py,sha256=PWPaJuTfaWD4-tgT-2WWOgeFV_jXxlxyKCxvXyylCUU,1824
4
- easycoder/ec_compiler.py,sha256=9byLqJZgMHAyFFyD8eGhY77oTsY1GY1aVcVrU4JAbd4,5287
4
+ easycoder/ec_compiler.py,sha256=-uuXDbfgFBGXSrr7EneDnnneFOFsU-UuCIpNHsCqY0s,5289
5
5
  easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
6
6
  easycoder/ec_core.py,sha256=JHcxmD2xq4Fy35CVkOWJOikKO31eV22EwiRwqxg-ILs,97786
7
7
  easycoder/ec_handler.py,sha256=ohf3xUuWw_Qb5SZnulGtDhvCb11kvWtYfgbQTiOXpIY,2261
8
8
  easycoder/ec_keyboard.py,sha256=wbc3ATqIgtSgV78UOuTXdbgIU6RHSjxr5YoJE4P2Wk8,19093
9
9
  easycoder/ec_program.py,sha256=SHg8NV9g-DclSWz8pQzgAiElreoYrI1FR1NrZS4_hIA,9968
10
- easycoder/ec_pyside.py,sha256=2mqqtgyxidOb25FCLy3J6JC4WHcw_eJzzMHzeqtd3T4,42427
10
+ easycoder/ec_pyside.py,sha256=GDBcFL03XV5D6168eG1vVwS1NMlEsDLC904YOMO_Hqw,42953
11
11
  easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
12
12
  easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
13
- easycoder-250725.2.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
14
- easycoder-250725.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
- easycoder-250725.2.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
16
- easycoder-250725.2.dist-info/METADATA,sha256=JYxzYVAQVEmN2LZy0nWlK32Aamf17XxSvUneVn8MmHc,6897
17
- easycoder-250725.2.dist-info/RECORD,,
13
+ easycoder-250726.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
14
+ easycoder-250726.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ easycoder-250726.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
16
+ easycoder-250726.1.dist-info/METADATA,sha256=T59iWsGiPkMxgE243FaFkN-YGjRp-Ii-i9sG0TTrCXk,6897
17
+ easycoder-250726.1.dist-info/RECORD,,