easycoder 250205.1__py2.py3-none-any.whl → 250207.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 CHANGED
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "250205.1"
12
+ __version__ = "250207.1"
easycoder/ec_core.py CHANGED
@@ -706,9 +706,11 @@ class Core(Handler):
706
706
  def r_load(self, command):
707
707
  target = self.getVariable(command['target'])
708
708
  file = self.getRuntimeValue(command['file'])
709
- f = open(file, 'r')
710
- content = f.read()
711
- f.close()
709
+ try:
710
+ with open(file, 'r') as f:
711
+ content = f.read()
712
+ except:
713
+ content=None
712
714
  value = {}
713
715
  value['type'] = 'text'
714
716
  value['content'] = content
@@ -1217,9 +1219,8 @@ class Core(Handler):
1217
1219
  def r_save(self, command):
1218
1220
  content = self.getRuntimeValue(command['content'])
1219
1221
  file = self.getRuntimeValue(command['file'])
1220
- f = open(file, 'w')
1221
- f.write(content)
1222
- f.close()
1222
+ with open(file, 'w') as f:
1223
+ f.write(content)
1223
1224
  return self.nextPC()
1224
1225
 
1225
1226
  # Send a message to a module
@@ -2400,22 +2401,11 @@ class Core(Handler):
2400
2401
  if self.nextToken() == 'with':
2401
2402
  condition.value2 = self.nextValue()
2402
2403
  return condition
2403
- return None
2404
2404
 
2405
2405
  if token == 'includes':
2406
2406
  condition.value2 = self.nextValue()
2407
2407
  return condition
2408
2408
 
2409
- if token == 'does':
2410
- self.nextToken()
2411
- if self.nextIs('not'):
2412
- if self.nextIs('include'):
2413
- condition.value2 = self.nextValue()
2414
- condition.type = 'includes'
2415
- condition.negate = True
2416
- return condition
2417
- return None
2418
-
2419
2409
  if token == 'is':
2420
2410
  token = self.nextToken()
2421
2411
  if self.peek() == 'not':
@@ -2503,8 +2493,7 @@ class Core(Handler):
2503
2493
  def c_includes(self, condition):
2504
2494
  value1 = self.getRuntimeValue(condition.value1)
2505
2495
  value2 = self.getRuntimeValue(condition.value2)
2506
- test = value2 in value1
2507
- return not test if condition.negate else test
2496
+ return value2 in value1
2508
2497
 
2509
2498
  def c_is(self, condition):
2510
2499
  comparison = self.program.compare(condition.value1, condition.value2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: easycoder
3
- Version: 250205.1
3
+ Version: 250207.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>
@@ -1,17 +1,17 @@
1
1
  easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
2
- easycoder/__init__.py,sha256=Y3LsOHjBOTK-wrREfqMN4Sq_ejIOx0eWV2xlP_-4Fa0,262
2
+ easycoder/__init__.py,sha256=bIXuFkzlKBKV89CzP8RTzVcXmrJ4rKJ6VctsvqmD4ns,262
3
3
  easycoder/ec_classes.py,sha256=xnWBNak8oKydkFoxHLlq9wo3lIsB3aMnTDrqbtCfoWo,1512
4
4
  easycoder/ec_compiler.py,sha256=dFJEA_uOhD-HeSiAdBzmmA6q3LHThUVoJpSETanmSHs,4800
5
5
  easycoder/ec_condition.py,sha256=WSbONo4zs2sX1icOVpscZDFSCAEFmTsquoc2RGcLx_k,763
6
- easycoder/ec_core.py,sha256=Z47ByZY8CrEv-Qy_x4jrOz1fKZ47qlmjWIhPmPPP5kc,87584
6
+ easycoder/ec_core.py,sha256=9YCBTXemI9T_TVtHfC2aSeVVyT7cCHCrwCCI6blY7pk,87209
7
7
  easycoder/ec_graphics.py,sha256=I5C4YYzdaCjL7_Vc7cNalABV18PL8QOqDbJQnQB6lrY,13000
8
8
  easycoder/ec_gutils.py,sha256=Pfz3u5KQieXm-F7qsB9gy6IUGDi-oJaX9xdiM9ZeO6s,5885
9
9
  easycoder/ec_handler.py,sha256=IJvxcrJJSR53d6DS_8H5qPHKhp9y5-GV4WXAjhZxu_o,2250
10
10
  easycoder/ec_program.py,sha256=R8zMukA-pfRsOpcy9WqTw7fE_190dQfrMt2la23Yrs4,9904
11
11
  easycoder/ec_timestamp.py,sha256=_3QFJPzIWZ9Rzk3SQOQJ-gwmvB07pg78k23SPntoZtY,288
12
12
  easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
13
- easycoder-250205.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
14
- easycoder-250205.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
- easycoder-250205.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
16
- easycoder-250205.1.dist-info/METADATA,sha256=0xFEU997MjQw1hTZokP-NIQXxcLhEz35wTIbNDW4UQE,6162
17
- easycoder-250205.1.dist-info/RECORD,,
13
+ easycoder-250207.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
14
+ easycoder-250207.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ easycoder-250207.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
16
+ easycoder-250207.1.dist-info/METADATA,sha256=hfeKKSAp_NMYhjLAFnxpA18xVPe2qaP7AGqWek7JnUU,6162
17
+ easycoder-250207.1.dist-info/RECORD,,