Skip to content

Commit 48e574d

Browse files
committed
250421.2
1 parent dcbe545 commit 48e574d

File tree

5 files changed

+459
-33
lines changed

5 files changed

+459
-33
lines changed

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,7 @@ Here in the repository is a folder called `scripts` containing some sample scrip
7272
`benchmark.ecs` allows the performance of **_EasyCoder_** to be compared to other languages if a similar script is written for each one.
7373

7474
## Graphical programming
75-
**_EasyCoder_** includes a graphical programming environment that is in the early stages of development. Some demo scripts will be included in the `scripts` directory; these can be recognised by the extension`.ecg`. To run them, first install `tkinter`. On Linux this is done with
76-
```
77-
sudo apt install python3-tk
78-
```
79-
80-
Next, install the Python `pySimpleGUI` graphics library; this is done with `pip install pysimplegui`. Then run your **_EasyCoder_** script using `easycoder {scriptname}.ecg`.
81-
82-
Graphical scripts look much like any other script but their file names must use the extension `.ecg` to signal to **_EasyCoder_** that it needs to load the graphics module. Non-graphical applications can use any extension but `.ecs` is recommended. This allows the **_EasyCoder_** application to be used wherever Python is installed, in either a command-line or a graphical environment, but graphics will of course not be available in the former.
83-
84-
Some demo graphical scripts will included in the `scripts` directory as development proceeds.
85-
86-
`gtest.ecg` contains sample code to demonstrate and test basic features.
75+
**_EasyCoder_** includes a graphical programming environment based on PySide6, that is in the early stages of development. Some demo scripts will be included in the `scripts` directory as development proceeds.
8776

8877
## Significant features
8978

easycoder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
from .ec_timestamp import *
1010
from .ec_value import *
1111

12-
__version__ = "250406.1"
12+
__version__ = "250421.2"

easycoder/ec_core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,13 @@ def r_unlock(self, command):
15971597
target['locked'] = False
15981598
return self.nextPC()
15991599

1600+
def k_use(self, command):
1601+
if self.nextIs('graphics'):
1602+
from .ec_pyside6 import Graphics
1603+
self.program.classes.append(Graphics)
1604+
self.program.processClasses()
1605+
return True
1606+
16001607
# Declare a general-purpose variable
16011608
def k_variable(self, command):
16021609
return self.compileVariable(command, True)

0 commit comments

Comments
 (0)