easycoder 250403.1__py2.py3-none-any.whl → 250404.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 +11 -5
- {easycoder-250403.1.dist-info → easycoder-250404.1.dist-info}/METADATA +15 -10
- {easycoder-250403.1.dist-info → easycoder-250404.1.dist-info}/RECORD +7 -9
- easycoder/__init__.sync-conflict-20250331-210244-M3XB3VD.py +0 -12
- easycoder/ec_core.sync-conflict-20250331-210238-M3XB3VD.py +0 -2564
- {easycoder-250403.1.dist-info → easycoder-250404.1.dist-info}/WHEEL +0 -0
- {easycoder-250403.1.dist-info → easycoder-250404.1.dist-info}/entry_points.txt +0 -0
- {easycoder-250403.1.dist-info → easycoder-250404.1.dist-info}/licenses/LICENSE +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_core.py
CHANGED
|
@@ -2420,11 +2420,16 @@ class Core(Handler):
|
|
|
2420
2420
|
|
|
2421
2421
|
if self.getToken() == 'file':
|
|
2422
2422
|
path = self.nextValue()
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2423
|
+
condition.path = path
|
|
2424
|
+
condition.type = 'exists'
|
|
2425
|
+
token = self.nextToken()
|
|
2426
|
+
if token == 'exists':
|
|
2427
2427
|
return condition
|
|
2428
|
+
elif token == 'does':
|
|
2429
|
+
if self.nextIs('not'):
|
|
2430
|
+
if self.nextIs('exist'):
|
|
2431
|
+
condition.negate = not condition.negate
|
|
2432
|
+
return condition
|
|
2428
2433
|
return None
|
|
2429
2434
|
|
|
2430
2435
|
value = self.getValue()
|
|
@@ -2534,7 +2539,8 @@ class Core(Handler):
|
|
|
2534
2539
|
|
|
2535
2540
|
def c_exists(self, condition):
|
|
2536
2541
|
path = self.getRuntimeValue(condition.path)
|
|
2537
|
-
|
|
2542
|
+
comparison = os.path.exists(path)
|
|
2543
|
+
return not comparison if condition.negate else comparison
|
|
2538
2544
|
|
|
2539
2545
|
def c_greater(self, condition):
|
|
2540
2546
|
comparison = self.program.compare(condition.value1, condition.value2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250404.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>
|
|
@@ -45,32 +45,37 @@ fi
|
|
|
45
45
|
Now write a test script, 'hello.ecs', containing the following:
|
|
46
46
|
```
|
|
47
47
|
print `Hello, world!`
|
|
48
|
+
exit
|
|
48
49
|
```
|
|
49
50
|
(Note the backticks.) This is traditionally the first program to be written in virtually any language. To run it, use `easycoder hello.ecs`.
|
|
50
51
|
|
|
51
|
-
The output will look like this (the version number will differ):
|
|
52
|
+
The output will look like this (the version number will likely differ):
|
|
52
53
|
```
|
|
53
|
-
EasyCoder version
|
|
54
|
+
EasyCoder version 250403.1
|
|
54
55
|
Compiled <anon>: 1 lines (2 tokens) in 0 ms
|
|
55
56
|
Run <anon>
|
|
56
|
-
|
|
57
|
+
Hello, world!
|
|
57
58
|
```
|
|
58
59
|
|
|
60
|
+
Why the `exit`? Because EasyCoder can't tell that the program is finished. It might contain elements that are waiting for outside events, so without `exit` it just stops and waits. You can kill it by typing Control-C.
|
|
61
|
+
|
|
59
62
|
It's conventional to add a program title to a script:
|
|
60
63
|
```
|
|
61
64
|
! Test script
|
|
62
65
|
script Test
|
|
63
|
-
|
|
66
|
+
log `Hello, world!`
|
|
67
|
+
exit
|
|
64
68
|
```
|
|
65
|
-
|
|
69
|
+
|
|
70
|
+
The first line here is just a comment and has no effect on the running of the script. The second line gives the script a name, which is useful in debugging as it says which script was running. I've also changed `print` to `log` to get more information from the script. When run, the output is now
|
|
66
71
|
```
|
|
67
|
-
EasyCoder version
|
|
72
|
+
EasyCoder version 250403.1
|
|
68
73
|
Compiled Test: 3 lines (4 tokens) in 0 ms
|
|
69
74
|
Run Test
|
|
70
|
-
3-> Hello, world!
|
|
75
|
+
16:37:39.132311: 3-> Hello, world!
|
|
71
76
|
```
|
|
72
77
|
|
|
73
|
-
As you might guess from the above, the
|
|
78
|
+
As you might guess from the above, the `log` command shows the time and the line in the script it was called from. This is very useful in tracking down debugging print commands in large scripts.
|
|
74
79
|
|
|
75
80
|
Here in the repository is a folder called `scripts` containing some sample scripts:
|
|
76
81
|
|
|
@@ -78,7 +83,7 @@ Here in the repository is a folder called `scripts` containing some sample scrip
|
|
|
78
83
|
`tests.ecs` is a test program containing many of the **_EasyCoder_** features
|
|
79
84
|
`benchmark.ecs` allows the performance of **_EasyCoder_** to be compared to other languages if a similar script is written for each one.
|
|
80
85
|
|
|
81
|
-
## Graphical
|
|
86
|
+
## Graphical programming
|
|
82
87
|
**_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
|
|
83
88
|
```
|
|
84
89
|
sudo apt install python3-tk
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
|
|
2
|
-
easycoder/__init__.py,sha256=
|
|
3
|
-
easycoder/__init__.sync-conflict-20250331-210244-M3XB3VD.py,sha256=X9oWXDvpy4ZlAVmbFrtv3ktYGIY1K1Qt-4aAvKEiaBk,262
|
|
2
|
+
easycoder/__init__.py,sha256=3kYnkna31D7vAYmC6A4w3gH33F63SBdkorhYLjp5ZkM,262
|
|
4
3
|
easycoder/ec_classes.py,sha256=xnWBNak8oKydkFoxHLlq9wo3lIsB3aMnTDrqbtCfoWo,1512
|
|
5
4
|
easycoder/ec_compiler.py,sha256=rtxFEWnhW0550MtWEDvYHOw9cYkeTcR0oG3t-kmgnBk,4795
|
|
6
5
|
easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
|
|
7
|
-
easycoder/ec_core.py,sha256=
|
|
8
|
-
easycoder/ec_core.sync-conflict-20250331-210238-M3XB3VD.py,sha256=u4v023v26kjXU-_B46IpMeM8Lb2mUSLnpzmAs2Z83mI,88454
|
|
6
|
+
easycoder/ec_core.py,sha256=pOIZ8lpOuhPieJFo0-alVQpUQCbbLElrFhN61ZIQ_9U,90359
|
|
9
7
|
easycoder/ec_graphics.py,sha256=ScGLNxW_sxu0WyoO-Od-9MM0bhpVvf-vGa5UmoHYRCA,16073
|
|
10
8
|
easycoder/ec_gutils.py,sha256=yqu4RRQ6VdRkC5B2ADBYsXzgNu76dLnekd9aUjdEgPw,6399
|
|
11
9
|
easycoder/ec_handler.py,sha256=K7nBuQTH8l0k8hX1o2b4KhTnhZHGdf2fkEuX4FJXJs8,2277
|
|
12
10
|
easycoder/ec_program.py,sha256=BDwU7aGHiaw6WdbQvVFDhGVaHsvwQ1CWa4wb5MPmOe8,10013
|
|
13
11
|
easycoder/ec_timestamp.py,sha256=_3QFJPzIWZ9Rzk3SQOQJ-gwmvB07pg78k23SPntoZtY,288
|
|
14
12
|
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
15
|
-
easycoder-
|
|
16
|
-
easycoder-
|
|
17
|
-
easycoder-
|
|
18
|
-
easycoder-
|
|
19
|
-
easycoder-
|
|
13
|
+
easycoder-250404.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
14
|
+
easycoder-250404.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
15
|
+
easycoder-250404.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
|
|
16
|
+
easycoder-250404.1.dist-info/METADATA,sha256=0AwduyAV9dASRf-dHgLJmMOjhScUTyCOr7E7GCmEDu8,6520
|
|
17
|
+
easycoder-250404.1.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'''EasyCoder for Python'''
|
|
2
|
-
|
|
3
|
-
from .ec_classes import *
|
|
4
|
-
from .ec_compiler import *
|
|
5
|
-
from .ec_condition import *
|
|
6
|
-
from .ec_core import *
|
|
7
|
-
from .ec_handler import *
|
|
8
|
-
from .ec_program import *
|
|
9
|
-
from .ec_timestamp import *
|
|
10
|
-
from .ec_value import *
|
|
11
|
-
|
|
12
|
-
__version__ = "250302.1"
|