easycoder 2__tar.gz → 4__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,10 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: easycoder
3
- Version: 2
3
+ Version: 4
4
4
  Summary: EasyCoder for Python
5
5
  Author-email: Graham Trott <gtanyware@gmail.com>
6
6
  Description-Content-Type: text/markdown
7
7
  Classifier: License :: OSI Approved :: MIT License
8
+ Requires-Dist: pytz
8
9
  Project-URL: Home, https://github.com/easycoder
9
10
 
10
11
  # Introduction
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "2"
12
+ __version__ = "4"
@@ -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()
@@ -300,3 +302,10 @@ class Program:
300
302
  if v1 < v2:
301
303
  return -1
302
304
  return 0
305
+
306
+ # This is the program launcher
307
+ def Main():
308
+ if (len(sys.argv) > 1):
309
+ Program(sys.argv[1:])
310
+ else:
311
+ print('Syntax: easycoder <scriptname> [plugins]')
@@ -9,6 +9,12 @@ readme = "README.md"
9
9
  license = {file = "LICENSE"}
10
10
  classifiers = ["License :: OSI Approved :: MIT License"]
11
11
  dynamic = ["version", "description"]
12
+ dependencies = [
13
+ "pytz"
14
+ ]
15
+
16
+ [project.scripts]
17
+ easycoder = "easycoder:Main"
12
18
 
13
19
  [project.urls]
14
20
  Home = "https://github.com/easycoder"
@@ -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
@@ -1,4 +1,6 @@
1
- script Benchmark
1
+ ! A test script
2
+
3
+ script Tests
2
4
 
3
5
  variable N
4
6
  variable M
@@ -140,6 +142,7 @@ Loop1:
140
142
  open File `test.txt` for reading
141
143
  read X from File
142
144
  close File
145
+ delete file `test.txt`
143
146
  assert X is `Hello, world!` cat newline cat `I'm back!`
144
147
 
145
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