easycoder 241211.2__tar.gz → 250116.1__tar.gz

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.

Files changed (174) hide show
  1. easycoder-250116.1/PKG-INFO +102 -0
  2. easycoder-250116.1/README.md +90 -0
  3. easycoder-250116.1/doc/README.md +7 -0
  4. easycoder-250116.1/doc/core/README.md +23 -0
  5. easycoder-250116.1/doc/core/conditions/boolean.md +16 -0
  6. easycoder-250116.1/doc/core/conditions/empty.md +15 -0
  7. easycoder-250116.1/doc/core/conditions/ends.md +15 -0
  8. easycoder-250116.1/doc/core/conditions/even.md +15 -0
  9. easycoder-250116.1/doc/core/conditions/exists.md +15 -0
  10. easycoder-250116.1/doc/core/conditions/greater.md +16 -0
  11. easycoder-250116.1/doc/core/conditions/hasProperty.md +15 -0
  12. easycoder-250116.1/doc/core/conditions/includes.md +15 -0
  13. easycoder-250116.1/doc/core/conditions/is.md +15 -0
  14. easycoder-250116.1/doc/core/conditions/less.md +16 -0
  15. easycoder-250116.1/doc/core/conditions/list.md +15 -0
  16. easycoder-250116.1/doc/core/conditions/none.md +15 -0
  17. easycoder-250116.1/doc/core/conditions/not.md +15 -0
  18. easycoder-250116.1/doc/core/conditions/numeric.md +15 -0
  19. easycoder-250116.1/doc/core/conditions/object.md +15 -0
  20. easycoder-250116.1/doc/core/conditions/odd.md +15 -0
  21. easycoder-250116.1/doc/core/conditions/starts.md +15 -0
  22. easycoder-250116.1/doc/core/conditions/string.md +15 -0
  23. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/add.md +3 -1
  24. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/append.md +3 -1
  25. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/assert.md +3 -1
  26. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/begin.md +3 -1
  27. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/clear.md +3 -1
  28. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/close.md +3 -1
  29. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/create.md +3 -1
  30. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/debug.md +3 -1
  31. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/decrement.md +3 -1
  32. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/delete.md +3 -1
  33. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/divide.md +3 -1
  34. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/exit.md +3 -1
  35. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/file.md +3 -1
  36. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/fork.md +3 -1
  37. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/get.md +4 -2
  38. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/go.md +3 -1
  39. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/gosub.md +3 -1
  40. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/if.md +4 -2
  41. easycoder-250116.1/doc/core/keywords/import.md +21 -0
  42. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/increment.md +4 -2
  43. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/index.md +3 -1
  44. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/init.md +3 -1
  45. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/input.md +4 -2
  46. easycoder-250116.1/doc/core/keywords/load.md +16 -0
  47. easycoder-250116.1/doc/core/keywords/lock.md +15 -0
  48. easycoder-250116.1/doc/core/keywords/module.md +17 -0
  49. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/multiply.md +5 -3
  50. easycoder-250116.1/doc/core/keywords/negate.md +13 -0
  51. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/open.md +4 -2
  52. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/pop.md +3 -1
  53. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/post.md +3 -1
  54. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/print.md +3 -1
  55. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/push.md +3 -1
  56. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/put.md +3 -1
  57. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/read.md +4 -2
  58. easycoder-250116.1/doc/core/keywords/release.md +15 -0
  59. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/replace.md +4 -2
  60. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/return.md +4 -2
  61. easycoder-250116.1/doc/core/keywords/run.md +15 -0
  62. easycoder-250116.1/doc/core/keywords/save.md +16 -0
  63. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/script.md +4 -2
  64. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/set.md +10 -4
  65. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/split.md +3 -1
  66. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/stack.md +3 -1
  67. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/stop.md +3 -1
  68. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/system.md +3 -1
  69. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/take.md +3 -1
  70. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/toggle.md +3 -1
  71. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/truncate.md +4 -2
  72. easycoder-250116.1/doc/core/keywords/unlock.md +15 -0
  73. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/variable.md +4 -2
  74. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/wait.md +3 -1
  75. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/while.md +3 -1
  76. {easycoder-241211.2/doc/core → easycoder-250116.1/doc/core/keywords}/write.md +3 -1
  77. easycoder-250116.1/doc/core/values/arg.md +16 -0
  78. easycoder-250116.1/doc/core/values/args.md +15 -0
  79. easycoder-250116.1/doc/core/values/cos.md +16 -0
  80. easycoder-250116.1/doc/core/values/datime.md +17 -0
  81. easycoder-250116.1/doc/core/values/decode.md +15 -0
  82. easycoder-250116.1/doc/core/values/element.md +16 -0
  83. easycoder-250116.1/doc/core/values/elements.md +15 -0
  84. easycoder-250116.1/doc/core/values/empty.md +15 -0
  85. easycoder-250116.1/doc/core/values/encode.md +15 -0
  86. easycoder-250116.1/doc/core/values/error.md +16 -0
  87. easycoder-250116.1/doc/core/values/files.md +15 -0
  88. easycoder-250116.1/doc/core/values/float.md +16 -0
  89. easycoder-250116.1/doc/core/values/from.md +17 -0
  90. easycoder-250116.1/doc/core/values/hash.md +16 -0
  91. easycoder-250116.1/doc/core/values/index.md +19 -0
  92. easycoder-250116.1/doc/core/values/integer.md +15 -0
  93. easycoder-250116.1/doc/core/values/json.md +15 -0
  94. easycoder-250116.1/doc/core/values/keys.md +15 -0
  95. easycoder-250116.1/doc/core/values/left.md +15 -0
  96. easycoder-250116.1/doc/core/values/length.md +15 -0
  97. easycoder-250116.1/doc/core/values/lowercase.md +15 -0
  98. easycoder-250116.1/doc/core/values/memory.md +15 -0
  99. easycoder-250116.1/doc/core/values/modification.md +15 -0
  100. easycoder-250116.1/doc/core/values/modulo.md +15 -0
  101. easycoder-250116.1/doc/core/values/newline.md +15 -0
  102. easycoder-250116.1/doc/core/values/now.md +15 -0
  103. easycoder-250116.1/doc/core/values/position.md +15 -0
  104. easycoder-250116.1/doc/core/values/property.md +15 -0
  105. easycoder-250116.1/doc/core/values/random.md +16 -0
  106. easycoder-250116.1/doc/core/values/right.md +15 -0
  107. easycoder-250116.1/doc/core/values/sin.md +16 -0
  108. easycoder-250116.1/doc/core/values/stringify.md +15 -0
  109. easycoder-250116.1/doc/core/values/tab.md +15 -0
  110. easycoder-250116.1/doc/core/values/tan.md +16 -0
  111. easycoder-250116.1/doc/core/values/timestamp.md +18 -0
  112. easycoder-250116.1/doc/core/values/today.md +15 -0
  113. easycoder-250116.1/doc/core/values/trim.md +15 -0
  114. easycoder-250116.1/doc/core/values/type.md +16 -0
  115. easycoder-250116.1/doc/core/values/uppercase.md +15 -0
  116. easycoder-250116.1/doc/core/values/value.md +15 -0
  117. easycoder-250116.1/doc/core/values/weekday.md +15 -0
  118. easycoder-250116.1/doc/graphics/README.md +22 -0
  119. easycoder-250116.1/doc/graphics/keywords/attach.md +18 -0
  120. easycoder-250116.1/doc/graphics/keywords/close.md +15 -0
  121. easycoder-250116.1/doc/graphics/keywords/create.md +15 -0
  122. easycoder-250116.1/doc/graphics/keywords/ellipse.md +15 -0
  123. easycoder-250116.1/doc/graphics/keywords/image.md +15 -0
  124. easycoder-250116.1/doc/graphics/keywords/move.md +17 -0
  125. easycoder-250116.1/doc/graphics/keywords/on.md +16 -0
  126. easycoder-250116.1/doc/graphics/keywords/rectangle.md +15 -0
  127. easycoder-250116.1/doc/graphics/keywords/render.md +18 -0
  128. easycoder-250116.1/doc/graphics/keywords/run.md +18 -0
  129. easycoder-250116.1/doc/graphics/keywords/set.md +15 -0
  130. easycoder-250116.1/doc/graphics/keywords/text.md +15 -0
  131. easycoder-250116.1/doc/graphics/values/attribute.md +15 -0
  132. easycoder-250116.1/doc/graphics/values/window.md +15 -0
  133. easycoder-250116.1/easycoder/README.md +6 -0
  134. {easycoder-241211.2 → easycoder-250116.1}/easycoder/__init__.py +1 -1
  135. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_classes.py +8 -2
  136. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_compiler.py +10 -6
  137. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_core.py +493 -208
  138. easycoder-250116.1/easycoder/ec_graphics.py +326 -0
  139. easycoder-250116.1/easycoder/ec_gutils.py +52 -0
  140. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_handler.py +1 -0
  141. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_program.py +156 -79
  142. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_value.py +21 -14
  143. easycoder-250116.1/images/Semoigo Dawn.jpg +0 -0
  144. easycoder-250116.1/json/graphics-demo.json +74 -0
  145. easycoder-250116.1/plugins/ec_keyboard.py +205 -0
  146. easycoder-250116.1/plugins/example.py +91 -0
  147. easycoder-250116.1/plugins/keyboards/4-function.json +62 -0
  148. easycoder-250116.1/plugins/keyboards/4-function.png +0 -0
  149. easycoder-250116.1/plugins/keyboards/qwerty-0.json +179 -0
  150. easycoder-250116.1/plugins/keyboards/qwerty-0.png +0 -0
  151. easycoder-250116.1/plugins/keyboards/qwerty-1.json +179 -0
  152. easycoder-250116.1/plugins/keyboards/qwerty-1.png +0 -0
  153. easycoder-250116.1/plugins/keyboards/qwerty-2.json +179 -0
  154. easycoder-250116.1/plugins/keyboards/qwerty-2.png +0 -0
  155. easycoder-250116.1/plugins/keyboards/qwerty-3.json +180 -0
  156. easycoder-250116.1/plugins/keyboards/qwerty-3.png +0 -0
  157. {easycoder-241211.2 → easycoder-250116.1}/pyproject.toml +4 -2
  158. easycoder-250116.1/scripts/README.md +16 -0
  159. {easycoder-241211.2 → easycoder-250116.1}/scripts/benchmark.ecs +1 -0
  160. easycoder-250116.1/scripts/ec_keyboard.py +191 -0
  161. {easycoder-241211.2 → easycoder-250116.1}/scripts/fizzbuzz.ecs +1 -0
  162. {easycoder-241211.2 → easycoder-250116.1}/scripts/hello.ecs +1 -0
  163. easycoder-250116.1/scripts/points.ecs +17 -0
  164. easycoder-250116.1/scripts/test.ecs +12 -0
  165. easycoder-250116.1/scripts/testg.ecg +44 -0
  166. {easycoder-241211.2 → easycoder-250116.1}/scripts/tests.ecs +47 -1
  167. easycoder-241211.2/PKG-INFO +0 -71
  168. easycoder-241211.2/README.md +0 -60
  169. easycoder-241211.2/doc/core.md +0 -12
  170. easycoder-241211.2/test.ecs +0 -10
  171. {easycoder-241211.2 → easycoder-250116.1}/LICENSE +0 -0
  172. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_condition.py +0 -0
  173. {easycoder-241211.2 → easycoder-250116.1}/easycoder/ec_timestamp.py +0 -0
  174. {easycoder-241211.2 → easycoder-250116.1}/plugins/ec_p100.py +0 -0
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.1
2
+ Name: easycoder
3
+ Version: 250116.1
4
+ Summary: Rapid scripting in English
5
+ Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
6
+ Author-email: Graham Trott <gtanyware@gmail.com>
7
+ Description-Content-Type: text/markdown
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Requires-Dist: pytz
10
+ Project-URL: Home, https://github.com/easycoder/easycoder-py
11
+
12
+ # Introduction
13
+ **_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction. This version of the language is written in Python and it acts as a fairly thin wrapper around Python functions, giving fast compilation and good runtime performance for general applications.
14
+ <hr>
15
+
16
+ There is also a JavaScript version of **_EasyCoder_**, which provides a full set of graphical features to run in a browser. For this, please visit
17
+
18
+ Repository: [https://github.com/easycoder/easycoder.github.io](https://github.com/easycoder/easycoder.github.io)
19
+ Website: [https://easycoder.github.io](https://easycoder.github.io)
20
+ <hr>
21
+
22
+ ## Quick Start
23
+ Install **_EasyCoder_** in your Python environment:
24
+ ```
25
+ pip install easycoder
26
+ ```
27
+ You may also need to install `pytz`, as some commands need it.
28
+
29
+ Write a test script, 'hello.ecs', containing the following:
30
+ ```
31
+ print `Hello, world!`
32
+ ```
33
+ This is traditionally the first program to be written in virtually any language. To run it, use `easycoder hello.ecs`.
34
+
35
+ The output will look like this (the version number will differ):
36
+ ```
37
+ EasyCoder version 250101.1
38
+ Compiled <anon>: 1 lines (2 tokens) in 0 ms
39
+ Run <anon>
40
+ 1-> Hello, world!
41
+ ```
42
+
43
+ It's conventional to add a program title to a script:
44
+ ```
45
+ ! Test script
46
+ script Test
47
+ print `Hello, world!`
48
+ ```
49
+ 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. When run, the output is now
50
+ ```
51
+ EasyCoder version 250101.1
52
+ Compiled Test: 3 lines (4 tokens) in 0 ms
53
+ Run Test
54
+ 3-> Hello, world!
55
+ ```
56
+
57
+ As you might guess from the above, the print command shows the line in the script it was called from. This is very useful in tracking down debugging print commands in large scripts.
58
+
59
+ Here in the repository is a folder called `scripts` containing some sample scripts:
60
+
61
+ `fizzbuzz.ecs` is a simple programming challenge often given at job interviews
62
+ `tests.ecs` is a test program containing many of the **_EasyCoder_** features
63
+ `benchmark.ecs` allows the performance of **_EasyCoder_** to be compared to other languages if a similar script is written for each one.
64
+
65
+ ## Graphical programmming
66
+ **_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`.
67
+
68
+ 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.
69
+
70
+ Some demo graphical scripts are included in the `scripts` directory:
71
+
72
+ `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.
73
+
74
+ `wave.ecg` is a "Mexican Wave" simulation.
75
+
76
+ `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.
77
+
78
+ **_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.
79
+
80
+ ## Significant features
81
+
82
+ - English-like syntax based on vocabulary rather than structure. Scripts can be read as English
83
+ - Comprehensive feature set
84
+ - Runs directly from source scripts. A fast compiler creates efficient intermediate code that runs immediately after compilation
85
+ - Low memory requirements
86
+ - Minimim dependency on other 3rd-party packages
87
+ - Built-in co-operative multitasking
88
+ - Dynamic loading of scripts on demand
89
+ - The language can be extended seamlessly using plugin function modules
90
+ - Plays well with any Python code
91
+ - Fully Open Source
92
+
93
+ ## Programming reference
94
+
95
+ **_EasyCoder_** comprises a set of modules to handle tokenisation, compilation and runtime control. Syntax and grammar are defined by [packages](doc/README.md), of which there are currently two; the [core](doc/core/README.md) package, which implements a comprehensive set of command-line programming features, and and the [graphics](doc/graphics/README.md) package, which adds graphical features in a windowing environment.
96
+
97
+ ## Extending the language
98
+
99
+ **_EasyCoder_** can be extended to add new functionality with the use of 'plugins'. These contain compiler and runtime modules for the added language features. **_EasyCoder_** can use the added keywords, values and conditions freely; the effect is completely seamless. There is an outline example in the `plugins` directory called `example.py`, which comprises a module called `Points` with new language syntax to deal with two-valued items such as coordinates. In the `scripts` directory there is `points.ecs`, which exercises the new functionality.
100
+
101
+ A plugin can act as a wrapper around any Python functionality that has a sensible API, thereby hiding its complexity. The only challenge is to devise an unambiguous syntax that doesn't clash with anything already existing in **_EasyCoder_**.
102
+
@@ -0,0 +1,90 @@
1
+ # Introduction
2
+ **_EasyCoder_** is a high-level English-like scripting language suited for prototyping and rapid testing of ideas. It operates on the command line and a graphics module is under construction. This version of the language is written in Python and it acts as a fairly thin wrapper around Python functions, giving fast compilation and good runtime performance for general applications.
3
+ <hr>
4
+
5
+ There is also a JavaScript version of **_EasyCoder_**, which provides a full set of graphical features to run in a browser. For this, please visit
6
+
7
+ Repository: [https://github.com/easycoder/easycoder.github.io](https://github.com/easycoder/easycoder.github.io)
8
+ Website: [https://easycoder.github.io](https://easycoder.github.io)
9
+ <hr>
10
+
11
+ ## Quick Start
12
+ Install **_EasyCoder_** in your Python environment:
13
+ ```
14
+ pip install easycoder
15
+ ```
16
+ You may also need to install `pytz`, as some commands need it.
17
+
18
+ Write a test script, 'hello.ecs', containing the following:
19
+ ```
20
+ print `Hello, world!`
21
+ ```
22
+ This is traditionally the first program to be written in virtually any language. To run it, use `easycoder hello.ecs`.
23
+
24
+ The output will look like this (the version number will differ):
25
+ ```
26
+ EasyCoder version 250101.1
27
+ Compiled <anon>: 1 lines (2 tokens) in 0 ms
28
+ Run <anon>
29
+ 1-> Hello, world!
30
+ ```
31
+
32
+ It's conventional to add a program title to a script:
33
+ ```
34
+ ! Test script
35
+ script Test
36
+ print `Hello, world!`
37
+ ```
38
+ 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. When run, the output is now
39
+ ```
40
+ EasyCoder version 250101.1
41
+ Compiled Test: 3 lines (4 tokens) in 0 ms
42
+ Run Test
43
+ 3-> Hello, world!
44
+ ```
45
+
46
+ As you might guess from the above, the print command shows the line in the script it was called from. This is very useful in tracking down debugging print commands in large scripts.
47
+
48
+ Here in the repository is a folder called `scripts` containing some sample scripts:
49
+
50
+ `fizzbuzz.ecs` is a simple programming challenge often given at job interviews
51
+ `tests.ecs` is a test program containing many of the **_EasyCoder_** features
52
+ `benchmark.ecs` allows the performance of **_EasyCoder_** to be compared to other languages if a similar script is written for each one.
53
+
54
+ ## 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:
60
+
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.
62
+
63
+ `wave.ecg` is a "Mexican Wave" simulation.
64
+
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.
66
+
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.
68
+
69
+ ## Significant features
70
+
71
+ - English-like syntax based on vocabulary rather than structure. Scripts can be read as English
72
+ - Comprehensive feature set
73
+ - Runs directly from source scripts. A fast compiler creates efficient intermediate code that runs immediately after compilation
74
+ - Low memory requirements
75
+ - Minimim dependency on other 3rd-party packages
76
+ - Built-in co-operative multitasking
77
+ - Dynamic loading of scripts on demand
78
+ - The language can be extended seamlessly using plugin function modules
79
+ - Plays well with any Python code
80
+ - Fully Open Source
81
+
82
+ ## Programming reference
83
+
84
+ **_EasyCoder_** comprises a set of modules to handle tokenisation, compilation and runtime control. Syntax and grammar are defined by [packages](doc/README.md), of which there are currently two; the [core](doc/core/README.md) package, which implements a comprehensive set of command-line programming features, and and the [graphics](doc/graphics/README.md) package, which adds graphical features in a windowing environment.
85
+
86
+ ## Extending the language
87
+
88
+ **_EasyCoder_** can be extended to add new functionality with the use of 'plugins'. These contain compiler and runtime modules for the added language features. **_EasyCoder_** can use the added keywords, values and conditions freely; the effect is completely seamless. There is an outline example in the `plugins` directory called `example.py`, which comprises a module called `Points` with new language syntax to deal with two-valued items such as coordinates. In the `scripts` directory there is `points.ecs`, which exercises the new functionality.
89
+
90
+ A plugin can act as a wrapper around any Python functionality that has a sensible API, thereby hiding its complexity. The only challenge is to devise an unambiguous syntax that doesn't clash with anything already existing in **_EasyCoder_**.
@@ -0,0 +1,7 @@
1
+ # _EasyCoder_ packages
2
+
3
+ 'Packages' are components of the **_EasyCoder_** system that deal with specific groups of language features. Those included or available from the repository are
4
+
5
+ [core](core/README.md) contains all the language features needed to construct command-line applications to run on any computer equipped with Python.
6
+
7
+ [graphics](graphics/README.md) contains a growing selection of graphical language features, to construct applications that will run on a computer with a graphical user interface; Windows, Mac or Linux.
@@ -0,0 +1,23 @@
1
+ # The 'core' package
2
+
3
+ The core package contains all the keywords values and conditionals needed for general programming, and to build most command-line tools these are all that will be needed.
4
+
5
+ There are three primary components to the language:
6
+
7
+ - Keywords
8
+ - Values
9
+ - Conditions
10
+
11
+ The core keywords are:
12
+
13
+ [add](keywords/add.md) [append](keywords/append.md) [assert](keywords/assert.md) [begin](keywords/begin.md) [clear](keywords/clear.md) [close](keywords/close.md) [create](keywords/create.md) [debug](keywords/debug.md) [decrement](keywords/decrement.md) [delete](keywords/delete.md) [divide](keywords/divide.md) [exit](keywords/exit.md) [file](keywords/file.md) [fork](keywords/fork.md) [get](keywords/get.md) [go](keywords/go.md) [gosub](keywords/gosub.md) [if](keywords/if.md) [import](keywords/import.md) [increment](keywords/increment.md) [index](keywords/index.md) [init](keywords/init.md) [input](keywords/input.md) [load](keywords/load.md) [lock](keywords/lock.md) [module](keywords/module.md) [multiply](keywords/multiply.md) [negate](keywords/negate.md) [open](keywords/open.md) [pop](keywords/pop.md) [post](keywords/post.md) [print](keywords/print.md) [push](keywords/push.md) [put](keywords/put.md) [read](keywords/read.md) [replace](keywords/replace.md) [return](keywords/return.md) [run](keywords/run.md) [save](keywords/save.md) [script](keywords/script.md) [set](keywords/set.md) [split](keywords/split.md) [stack](keywords/stack.md) [stop](keywords/stop.md) [system](keywords/system.md) [take](keywords/take.md) [toggle](keywords/toggle.md) [truncate](keywords/truncate.md) [unlock](keywords/unlock.md) [variable](keywords/variable.md) [wait](keywords/wait.md) [while](keywords/while.md) [write](keywords/write.md)
14
+
15
+ The core values are:
16
+
17
+ [arg](values/arg.md) [args](values/args.md) [cos](values/cos.md) [count](values/count.md) [datime/datetime](values/datime.md) [decode](values/decode.md) [element](values/element.md) [elements](values/elements.md) [empty](values/empty.md) [encode](values/encode.md) [error](values/error.md) [files](values/files.md) [float](values/float.md) [from](values/from.md) [hash](values/hash.md) [index](values/index.md) [integer](values/integer.md) [json](values/json.md) [keys](values/keys.md) [left](values/left.md) [length](values/length.md) [lowercase](values/lowercase.md) [mem/memory](values/mem.md) [modification](values/modification.md) [message](values/message.md) [newline](values/newline.md) [now](values/now.md) [position](values/position.md) [property](values/property.md) [random](values/random.md) [right](values/right.md) [sin](values/sin.md) [stringify](values/stringify.md) [tab](values/tab.md) [tan](values/tan.md) [timestamp](values/timestamp.md) [today](values/today.md) [trim](values/trim.md) [type](values/type.md) [uppercase](values/uppercase.md) [value](values/value.md) [weekday](values/weekday.md)
18
+
19
+ The core conditions are:
20
+
21
+ [boolean](conditions/boolean.md) [empty](conditions/empty.md) [ends](conditions/ends.md) [even](conditions/even.md) [exists](conditions/exists.md) [greater](conditions/greater.md) [has property](conditions/hasProperty.md) [includes](conditions/includes.md) [is](conditions/is.md) [less](conditions/less.md) [list](conditions/list.md) [numeric](conditions/numeric.md) [none](conditions/none.md) [not](conditions/not.md) [object](conditions/object.md) [odd](conditions/odd.md) [starts](conditions/starts.md) [string](conditions/string.md)
22
+
23
+ [Back](../README.md)
@@ -0,0 +1,16 @@
1
+ # boolean
2
+
3
+ ## Syntax:
4
+ `{value} is [not] boolean`
5
+
6
+ ## Examples:
7
+ `if MyVariable is boolean stop`
8
+ ``if `true` is boolean stop` ``
9
+
10
+ ## Description:
11
+ Tests if the given value is boolean. The inclusion of `[not]` negates the test.
12
+
13
+ Next: [empty](empty.md)
14
+ Prev: [string](string.md)
15
+
16
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # empty
2
+
3
+ ## Syntax:
4
+ `{value} is [not] empty`
5
+
6
+ ## Examples:
7
+ `if MyVariable is empty stop`
8
+
9
+ ## Description:
10
+ Tests if the given value is an empty string. The inclusion of `[not]` negates the test.
11
+
12
+ Next: [ends](ends.md)
13
+ Prev: [boolean](boolean.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # ends
2
+
3
+ ## Syntax:
4
+ `{value} ends with {text}`
5
+
6
+ ## Examples:
7
+ ``if MyVariable ends with `#` stop` ``
8
+
9
+ ## Description:
10
+ Tests if the given value ends with a given string.
11
+
12
+ Next: [even](even.md)
13
+ Prev: [empty](empty.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # even
2
+
3
+ ## Syntax:
4
+ `{value} ends with {text}`
5
+
6
+ ## Examples:
7
+ ``if MyVariable ends with `#` stop` ``
8
+
9
+ ## Description:
10
+ Tests if the given number is even. The inclusion of `[not]` negates the test, or you can use [odd](odd.md).
11
+
12
+ Next: [exists](exists.md)
13
+ Prev: [ends](ends.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # exists
2
+
3
+ ## Syntax:
4
+ `{file path} exists`
5
+
6
+ ## Examples:
7
+ `if MyFile exists stop`
8
+
9
+ ## Description:
10
+ Tests if the named file exists.
11
+
12
+ Next: [greater](greater.md)
13
+ Prev: [even](even.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,16 @@
1
+ # greater
2
+
3
+ ## Syntax:
4
+ `{value} is [not] greater than {other value}`
5
+
6
+ ## Examples:
7
+ `if 10 is greater than 5 stop`
8
+ `if Value is not greater than 100 stop`
9
+
10
+ ## Description:
11
+ Tests if the value is greater than the second value. The inclusion of `[not]` negates the test.
12
+
13
+ Next: [has property](hasProperty.md)
14
+ Prev: [exists](exists.md)
15
+
16
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # has property
2
+
3
+ ## Syntax:
4
+ `{value} has property {property}`
5
+
6
+ ## Examples:
7
+ ``if Users has property `Andrew` stop` ``
8
+
9
+ ## Description:
10
+ Tests if the value - usually a variable - has the named property as one of its attributes.
11
+
12
+ Next: [includes](includes.md)
13
+ Prev: [greater](greater.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # includes
2
+
3
+ ## Syntax:
4
+ `{value} includes {element}`
5
+
6
+ ## Examples:
7
+ ``if Animals includes `cat` stop` ``
8
+
9
+ ## Description:
10
+ Tests if the array - usually a variable - has the named element as one of its members.
11
+
12
+ Next: [is](is.md)
13
+ Prev: [has property](hasProperty.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # is
2
+
3
+ ## Syntax:
4
+ `{value} is {second value}`
5
+
6
+ ## Examples:
7
+ ``if Animal is `cat` stop` ``
8
+
9
+ ## Description:
10
+ Tests if the value is identical to the second value.
11
+
12
+ Next: [less](less.md)
13
+ Prev: [includes](includes.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,16 @@
1
+ # less
2
+
3
+ ## Syntax:
4
+ `{value} is [not] less than {other value}`
5
+
6
+ ## Examples:
7
+ `if 10 is less than 5 stop`
8
+ `if Value is not less than 100 stop`
9
+
10
+ ## Description:
11
+ Tests if the value is less than the second value. The inclusion of `[not]` negates the test.
12
+
13
+ Next: [list](less.md)
14
+ Prev: [is](is.md)
15
+
16
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # list
2
+
3
+ ## Syntax:
4
+ `{value} is [not] list`
5
+
6
+ ## Examples:
7
+ `if MyData is not list stop`
8
+
9
+ ## Description:
10
+ Tests if the value is a list. The inclusion of `[not]` negates the test.
11
+
12
+ Next: [numeric](numeric.md)
13
+ Prev: [less](less.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # none
2
+
3
+ ## Syntax:
4
+ `{value} is [not] none`
5
+
6
+ ## Examples:
7
+ `if MyData is not none stop`
8
+
9
+ ## Description:
10
+ Tests if the value has the Python value `None`. The inclusion of `[not]` negates the test.
11
+
12
+ Next: [not](not.md)
13
+ Prev: [numeric](list.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # not
2
+
3
+ ## Syntax:
4
+ `{value} is not {second value}`
5
+
6
+ ## Examples:
7
+ `if Value is not 100 stop`
8
+
9
+ ## Description:
10
+ Tests if the value is not the same as the second value.
11
+
12
+ Next: [object](obect.md)
13
+ Prev: [none](none.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # numeric
2
+
3
+ ## Syntax:
4
+ `{value} is [not] numeric`
5
+
6
+ ## Examples:
7
+ `if MyData is not numeric stop`
8
+
9
+ ## Description:
10
+ Tests if the value is a numeric value. The inclusion of `[not]` negates the test.
11
+
12
+ Next: [none](none.md)
13
+ Prev: [list](list.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # object
2
+
3
+ ## Syntax:
4
+ `{value} is [not] object`
5
+
6
+ ## Examples:
7
+ `if Value is object stop`
8
+
9
+ ## Description:
10
+ Tests if the value is an object. The inclusion of `[not]` negates the test.
11
+
12
+ Next: [odd](odd.md)
13
+ Prev: [not](not.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # odd
2
+
3
+ ## Syntax:
4
+ `{value} is [not] odd`
5
+
6
+ ## Examples:
7
+ `if Value is odd stop`
8
+
9
+ ## Description:
10
+ Tests if the value is an odd number. The inclusion of `[not]` negates the test, or you can use [even](even.md).
11
+
12
+ Next: [starts](starts.md)
13
+ Prev: [object](object.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # starts
2
+
3
+ ## Syntax:
4
+ `{value} starts with {text}`
5
+
6
+ ## Examples:
7
+ ``if Value starts with `!` stop` ``
8
+
9
+ ## Description:
10
+ Tests if the value starts with the given text.
11
+
12
+ Next: [string](string.md)
13
+ Prev: [odd](odd.md)
14
+
15
+ [Back](../../README.md)
@@ -0,0 +1,15 @@
1
+ # string
2
+
3
+ ## Syntax:
4
+ `{value} is [not] string`
5
+
6
+ ## Examples:
7
+ `if Value is string stop`
8
+
9
+ ## Description:
10
+ Tests if the value is a text string.
11
+
12
+ Next: [boolean](boolean.md)
13
+ Prev: [starts](starts.md)
14
+
15
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ ## add
2
+
1
3
  ## Syntax:
2
4
  `add {value} to {variable}`
3
5
  `add {value} to {value} giving {variable}`
@@ -10,4 +12,4 @@ Adds a numeric value to a numeric variable or adds two values and puts the resul
10
12
  Next: [append](append.md)
11
13
  Prev: [write](write.md)
12
14
 
13
- [Back](../core.md)
15
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # append
2
+
1
3
  ## Syntax:
2
4
  `append {value} to {array}`
3
5
  ## Examples:
@@ -10,4 +12,4 @@ Appends an item to a JSON array, which is is a string value held in a single var
10
12
  Next: [assert](assert.md)
11
13
  Prev: [add](add.md)
12
14
 
13
- [Back](../core.md)
15
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # assert
2
+
1
3
  ## Syntax:
2
4
  `assert {condition}`
3
5
  ## Examples:
@@ -8,4 +10,4 @@ Tests the condition and throws an exception if it is not true.
8
10
  Next: [begin](begin.md)
9
11
  Prev: [append](append.md)
10
12
 
11
- [Back](../core.md)
13
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # begin
2
+
1
3
  ## Syntax:
2
4
  `begin ... end`
3
5
  ## Examples:
@@ -12,4 +14,4 @@
12
14
  Next: [clear](clear.md)
13
15
  Prev: [assert](assert.md)
14
16
 
15
- [Back](../core.md)
17
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # clear
2
+
1
3
  ## Syntax:
2
4
  `clear {variable}`
3
5
 
@@ -10,4 +12,4 @@
10
12
  Next: [close](close.md)
11
13
  Prev: [begin](begin.md)
12
14
 
13
- [Back](../core.md)
15
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # close
2
+
1
3
  ## Syntax:
2
4
  `close {file}`
3
5
  ## Examples:
@@ -8,4 +10,4 @@ Close the file identified by the `{file}` variable. See `file`, `open`, `read` a
8
10
  Next: [create](create.md)
9
11
  Prev: [clear](clear.md)
10
12
 
11
- [Back](../core.md)
13
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # create
2
+
1
3
  ## Syntax:
2
4
  `create directory {name}`
3
5
  ## Examples:
@@ -8,4 +10,4 @@ Create a directory, giving the full path in `{name}`.
8
10
  Next: [debug](debug.md)
9
11
  Prev: [close](close.md)
10
12
 
11
- [Back](../core.md)
13
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # debug
2
+
1
3
  ## Syntax:
2
4
  `debug step/stop/program`
3
5
  ## Examples:
@@ -13,4 +15,4 @@ Set up a debug option.
13
15
  Next: [decrement](decrement.md)
14
16
  Prev: [create](create.md)
15
17
 
16
- [Back](../core.md)
18
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # decrement
2
+
1
3
  ## Syntax:
2
4
  `decrement {variable}`
3
5
  ## Examples:
@@ -8,4 +10,4 @@ Decrements the value of the variable by 1. See also [increment](increment.md)
8
10
  Next: [delete](delete.md)
9
11
  Prev: [debug](debug.md)
10
12
 
11
- [Back](../core.md)
13
+ [Back](../../README.md)
@@ -1,3 +1,5 @@
1
+ # delete
2
+
1
3
  ## Syntax:
2
4
  `delete {filename}`
3
5
  `delete property {value} of {variable}`
@@ -13,4 +15,4 @@ The second form deletes a named property of an object. See also [set property](s
13
15
  Next: [divide](divide.md)
14
16
  Prev: [decrement](decrement.md)
15
17
 
16
- [Back](../core.md)
18
+ [Back](../../README.md)