easycoder 250508.2__py2.py3-none-any.whl → 250518.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_core.py +3 -3
- easycoder/ec_pyside.py +26 -14
- {easycoder-250508.2.dist-info → easycoder-250518.1.dist-info}/METADATA +3 -3
- {easycoder-250508.2.dist-info → easycoder-250518.1.dist-info}/RECORD +8 -8
- {easycoder-250508.2.dist-info → easycoder-250518.1.dist-info}/WHEEL +1 -1
- {easycoder-250508.2.dist-info/licenses → easycoder-250518.1.dist-info}/LICENSE +0 -0
- {easycoder-250508.2.dist-info → easycoder-250518.1.dist-info}/entry_points.txt +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_core.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import json, math, hashlib, threading, os, subprocess, sys,
|
|
1
|
+
import json, math, hashlib, threading, os, subprocess, sys, time, numbers, base64, binascii, random, requests
|
|
2
2
|
from psutil import Process
|
|
3
|
-
from datetime import datetime
|
|
3
|
+
from datetime import datetime
|
|
4
4
|
from random import randrange
|
|
5
5
|
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Condition, Object
|
|
6
6
|
from .ec_handler import Handler
|
|
@@ -381,7 +381,7 @@ class Core(Handler):
|
|
|
381
381
|
|
|
382
382
|
def r_exit(self, command):
|
|
383
383
|
if self.program.graphics != None:
|
|
384
|
-
self.program.graphics.force_exit()
|
|
384
|
+
self.program.graphics.force_exit(None)
|
|
385
385
|
return -1
|
|
386
386
|
|
|
387
387
|
# Declare a file variable
|
easycoder/ec_pyside.py
CHANGED
|
@@ -37,11 +37,6 @@ from PySide6.QtWidgets import (
|
|
|
37
37
|
|
|
38
38
|
class Graphics(Handler):
|
|
39
39
|
|
|
40
|
-
class MainWindow(QMainWindow):
|
|
41
|
-
|
|
42
|
-
def __init__(self):
|
|
43
|
-
super().__init__()
|
|
44
|
-
|
|
45
40
|
def __init__(self, compiler):
|
|
46
41
|
Handler.__init__(self, compiler)
|
|
47
42
|
|
|
@@ -375,20 +370,17 @@ class Graphics(Handler):
|
|
|
375
370
|
return False
|
|
376
371
|
|
|
377
372
|
def r_createWindow(self, command, record):
|
|
378
|
-
window =
|
|
373
|
+
window = QMainWindow()
|
|
379
374
|
window.setWindowTitle(self.getRuntimeValue(command['title']))
|
|
380
375
|
w = self.getRuntimeValue(command['w'])
|
|
381
376
|
h = self.getRuntimeValue(command['h'])
|
|
382
377
|
x = command['x']
|
|
383
378
|
y = command['y']
|
|
384
|
-
if x == None: x = (self.screenWidth - w) / 2
|
|
379
|
+
if x == None: x = (self.program.screenWidth - w) / 2
|
|
385
380
|
else: x = self.getRuntimeValue(x)
|
|
386
|
-
if y == None: y = (self.screenHeight - h) / 2
|
|
381
|
+
if y == None: y = (self.program.screenHeight - h) / 2
|
|
387
382
|
else: y = self.getRuntimeValue(x)
|
|
388
383
|
window.setGeometry(x, y, w, h)
|
|
389
|
-
container = QWidget()
|
|
390
|
-
container.setLayout(self.getVariable(command['layout'])['widget'])
|
|
391
|
-
window.setCentralWidget(container)
|
|
392
384
|
record['window'] = window
|
|
393
385
|
return self.nextPC()
|
|
394
386
|
|
|
@@ -545,9 +537,9 @@ class Graphics(Handler):
|
|
|
545
537
|
def r_init(self, command):
|
|
546
538
|
self.app = QApplication(sys.argv)
|
|
547
539
|
screen = QApplication.screens()[0].size().toTuple()
|
|
548
|
-
self.screenWidth = screen[0]
|
|
549
|
-
self.screenHeight = screen[1]
|
|
550
|
-
print(f'Screen: {self.screenWidth}x{self.screenHeight}')
|
|
540
|
+
self.program.screenWidth = screen[0]
|
|
541
|
+
self.program.screenHeight = screen[1]
|
|
542
|
+
print(f'Screen: {self.program.screenWidth}x{self.program.screenHeight}')
|
|
551
543
|
return self.nextPC()
|
|
552
544
|
|
|
553
545
|
# Declare a label variable
|
|
@@ -712,6 +704,7 @@ class Graphics(Handler):
|
|
|
712
704
|
return self.nextPC()
|
|
713
705
|
|
|
714
706
|
# set [the] width/height [of] {widget} [to] {value}
|
|
707
|
+
# set [the] layout of {window} to {layout}
|
|
715
708
|
# set [the] text [of] {label}/{button}/{lineinput} [to] {text}
|
|
716
709
|
# set [the] color [of] {label}/{button}/{lineinput} [to] {color}
|
|
717
710
|
# set [the] state [of] {checkbox} [to] {color}
|
|
@@ -730,6 +723,18 @@ class Graphics(Handler):
|
|
|
730
723
|
command['value'] = self.nextValue()
|
|
731
724
|
self.add(command)
|
|
732
725
|
return True
|
|
726
|
+
elif token == 'layout':
|
|
727
|
+
self.skip('of')
|
|
728
|
+
if self.nextIsSymbol():
|
|
729
|
+
record = self.getSymbolRecord()
|
|
730
|
+
if record['keyword'] == 'window':
|
|
731
|
+
command['name'] = record['name']
|
|
732
|
+
self.skip('to')
|
|
733
|
+
if self.nextIsSymbol():
|
|
734
|
+
record = self.getSymbolRecord()
|
|
735
|
+
command['layout'] = record['name']
|
|
736
|
+
self.add(command)
|
|
737
|
+
return True
|
|
733
738
|
elif token == 'text':
|
|
734
739
|
self.skip('of')
|
|
735
740
|
if self.nextIsSymbol():
|
|
@@ -790,6 +795,13 @@ class Graphics(Handler):
|
|
|
790
795
|
elif what == 'width':
|
|
791
796
|
widget = self.getVariable(command['name'])['widget']
|
|
792
797
|
widget.setFixedWidth(self.getRuntimeValue(command['value']))
|
|
798
|
+
elif what == 'layout':
|
|
799
|
+
window = self.getVariable(command['name'])['window']
|
|
800
|
+
layout = self.getVariable(command['layout'])
|
|
801
|
+
content = self.getVariable(command['layout'])['widget']
|
|
802
|
+
container = QWidget()
|
|
803
|
+
container.setLayout(content)
|
|
804
|
+
window.setCentralWidget(container)
|
|
793
805
|
elif what == 'text':
|
|
794
806
|
record = self.getVariable(command['name'])
|
|
795
807
|
widget = self.getVariable(command['name'])['widget']
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250518.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>
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
License-File: LICENSE
|
|
10
9
|
Requires-Dist: pytz
|
|
10
|
+
Requires-Dist: requests
|
|
11
11
|
Requires-Dist: pyside6
|
|
12
12
|
Project-URL: Home, https://github.com/easycoder/easycoder-py
|
|
13
13
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
|
|
2
|
-
easycoder/__init__.py,sha256=
|
|
2
|
+
easycoder/__init__.py,sha256=8yrJdKMAo1fcUBele7RuG120U6R5ChqSYPzPPZ7UnT0,262
|
|
3
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=
|
|
6
|
+
easycoder/ec_core.py,sha256=OZRsF90uesePweZZQ64XEPlQ_se7xEMd3wUoNoSgOvg,91997
|
|
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=d_CchiglkCdAgX2CSIQ_WTWcDEvFWCQmRKdoqLCaooU,10087
|
|
11
|
-
easycoder/ec_pyside.py,sha256=
|
|
11
|
+
easycoder/ec_pyside.py,sha256=9A2F3giJyvbBb8Xj4Zd08kvkmCdmBz1g5eoasURadAQ,37733
|
|
12
12
|
easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
|
|
13
13
|
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
14
|
-
easycoder-
|
|
15
|
-
easycoder-
|
|
16
|
-
easycoder-
|
|
17
|
-
easycoder-
|
|
18
|
-
easycoder-
|
|
14
|
+
easycoder-250518.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
15
|
+
easycoder-250518.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
+
easycoder-250518.1.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
|
|
17
|
+
easycoder-250518.1.dist-info/METADATA,sha256=vHvoEYT1IDX4_-oDsSR7UB6ffNwuBuuiDxQ-xUkbNK4,6829
|
|
18
|
+
easycoder-250518.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|