Skip to content

Commit 6e17194

Browse files
committed
v250116.1
1 parent 51c1fc2 commit 6e17194

19 files changed

+355
-1048
lines changed

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,30 @@ Website: [https://easycoder.github.io](https://easycoder.github.io)
1111
## Quick Start
1212
Install **_EasyCoder_** in your Python environment:
1313
```
14-
pip install easycoder
14+
pip install requests pytz easycoder
1515
```
16-
You may also need to install `pytz`, as some commands need it.
1716

18-
Write a test script, 'hello.ecs', containing the following:
17+
Test the install by typing the command `easycoder`.
18+
<hr>
19+
On Linux, this will probably fail as the installer places the executable file in the `$HOME/.local/bin` directory. So give the command
20+
```
21+
export PATH=$HOME/.local/bin:$PATH
22+
```
23+
24+
To make this change permanent, edit your `.profile` file, adding the following:
25+
```
26+
# set PATH so it includes user's private .local/bin if it exists
27+
if [ -d "$HOME/.local/bin" ] ; then
28+
PATH="$HOME/.local/bin:$PATH"
29+
fi
30+
```
31+
<hr>
32+
33+
Now write a test script, 'hello.ecs', containing the following:
1934
```
2035
print `Hello, world!`
2136
```
22-
This is traditionally the first program to be written in virtually any language. To run it, use `easycoder hello.ecs`.
37+
(Note the backticks.) This is traditionally the first program to be written in virtually any language. To run it, use `easycoder hello.ecs`.
2338

2439
The output will look like this (the version number will differ):
2540
```
@@ -52,19 +67,18 @@ Here in the repository is a folder called `scripts` containing some sample scrip
5267
`benchmark.ecs` allows the performance of **_EasyCoder_** to be compared to other languages if a similar script is written for each one.
5368

5469
## Graphical programmming
55-
**_EasyCoder_** includes a graphical programming environment that is in the early stages of development. A couple of demo scripts are included in the `scripts` directory. To run them, first install the Python `kivy` graphics library if it's not already present on your system. This is done with `pip install kivy`. Then run your **_EasyCoder_** script using `easycoder {scriptname}.ecg`.
56-
57-
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.
58-
59-
Some demo graphical scripts are included in the `scripts` directory:
70+
**_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
71+
```
72+
sudo apt install python3-tk
73+
```
6074

61-
`graphics-demo.ecg` shows some of the elements that can be created, and demonstrates a variety of the graphical features of the language such as detecting when elements are clicked.
75+
Next, install the Python `pySimpleGUI` graphics library; this is done with `pip install pysimplegui`. Then run your **_EasyCoder_** script using `easycoder {scriptname}.ecg`.
6276

63-
`wave.ecg` is a "Mexican Wave" simulation.
77+
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.
6478

65-
`keyboard.ecg` creates an on-screen keyboard (currently a 4-function calculator keypad) that responds to clicks on its keys. It uses a plugin module (see below) to add extra vocabulary and syntax to the language. This is currently under development so its features are likely to change. The intention is to support a wide range of keyboard styles with the minimum mount of coding. The plugin (`ec_keyword.py`) can be downloaded from the repository.
79+
Some demo graphical scripts will included in the `scripts` directory as development proceeds.
6680

67-
**_EasyCoder_** graphics are handled by a library module, `ec_renderer` that can be used outside of the **_EasyCoder_** environment, in other Python programs. The renderer works with JSON-formatted specifications of the itens to be displayed.
81+
`gtest.ecg` contains sample code to demonstrate and test basic features.
6882

6983
## Significant features
7084

-35.1 KB
Binary file not shown.
31.1 KB
Binary file not shown.
Binary file not shown.

easycoder/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'''EasyCoder for Python'''
22

3-
from .ec import Main
43
from .ec_classes import *
54
from .ec_compiler import *
65
from .ec_condition import *
@@ -10,4 +9,4 @@
109
from .ec_timestamp import *
1110
from .ec_value import *
1211

13-
__version__ = "250111.2"
12+
__version__ = "250116.1"

easycoder/ec.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

easycoder/ec_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ def k_set(self, command):
12571257
command['elements'] = self.nextValue()
12581258
self.add(command)
12591259
return True
1260-
1260+
12611261
elif token == 'encoding':
12621262
if self.nextIs('to'):
12631263
command['encoding'] = self.nextValue()

0 commit comments

Comments
 (0)