easycoder 3__tar.gz → 5__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: easycoder
3
- Version: 3
3
+ Version: 5
4
4
  Summary: EasyCoder for Python
5
5
  Author-email: Graham Trott <gtanyware@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "3"
12
+ __version__ = "5"
@@ -5,10 +5,12 @@ from .ec_classes import Script, Token, FatalError, RuntimeError
5
5
  from .ec_compiler import Compiler
6
6
  from .ec_core import Core
7
7
  import importlib
8
+ from importlib.metadata import version
8
9
 
9
10
  class Program:
10
11
 
11
12
  def __init__(self, argv):
13
+ print(f'EasyCoder version {version("easycoder")}')
12
14
  scriptName = None
13
15
  domains=[Core]
14
16
  if len(argv)>0:
@@ -29,7 +31,7 @@ class Program:
29
31
  print('No script supplied')
30
32
  exit();
31
33
 
32
- print('Domains:',domains)
34
+ # print('Domains:',domains)
33
35
  f = open(scriptName, 'r')
34
36
  source = f.read()
35
37
  f.close()
@@ -301,6 +303,7 @@ class Program:
301
303
  return -1
302
304
  return 0
303
305
 
306
+ # This is the program launcher
304
307
  def Main():
305
308
  if (len(sys.argv) > 1):
306
309
  Program(sys.argv[1:])
@@ -0,0 +1,14 @@
1
+ ! FizzBuzz
2
+
3
+ script FizzBuzz
4
+
5
+ variable Number
6
+ put 0 into Number
7
+ while Number is less than 100
8
+ begin
9
+ add 1 to Number
10
+ if Number modulo 3 is 0 print `Fizz`
11
+ else if Number modulo 5 is 0 print `Buzz`
12
+ else if Number modulo 15 is 0 print `FizzBuzz`
13
+ else print Number
14
+ end
@@ -142,6 +142,7 @@ Loop1:
142
142
  open File `test.txt` for reading
143
143
  read X from File
144
144
  close File
145
+ delete file `test.txt`
145
146
  assert X is `Hello, world!` cat newline cat `I'm back!`
146
147
 
147
148
  exit
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes