easycoder 250826.2__tar.gz → 250920.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.
- {easycoder-250826.2 → easycoder-250920.1}/PKG-INFO +1 -1
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/__init__.py +1 -1
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_compiler.py +0 -1
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_core.py +49 -11
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_pyside.py +2 -0
- easycoder-250920.1/scripts/test.ecs +11 -0
- easycoder-250920.1/test.py +5 -0
- easycoder-250826.2/scripts/test.ecs +0 -3
- easycoder-250826.2/test.py +0 -5
- {easycoder-250826.2 → easycoder-250920.1}/.gitignore +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/LICENSE +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/README.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/backdrop.jpg +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/README.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/README.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/empty.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/ends.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/even.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/exists.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/greater.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/includes.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/is.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/less.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/list.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/none.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/not.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/object.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/odd.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/starts.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/conditions/string.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/add.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/append.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/assert.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/begin.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/clear.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/close.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/create.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/debug.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/delete.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/divide.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/exit.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/file.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/fork.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/get.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/go.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/if.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/import.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/increment.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/index.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/init.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/input.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/load.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/lock.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/log.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/module.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/negate.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/on.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/open.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/pop.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/post.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/print.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/push.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/put.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/read.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/release.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/replace.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/return.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/run.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/save.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/script.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/send.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/set.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/shuffle.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/split.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/stack.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/stop.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/system.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/take.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/use.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/variable.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/wait.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/while.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/keywords/write.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/arg.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/args.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/cos.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/datime.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/decode.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/element.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/elements.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/empty.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/encode.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/error.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/files.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/float.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/from.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/hash.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/index.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/integer.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/json.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/keys.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/left.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/length.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/lowercase.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/memory.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/modification.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/modulo.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/newline.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/now.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/position.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/property.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/random.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/right.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/sin.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/stringify.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/tab.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/tan.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/timestamp.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/today.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/trim.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/type.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/uppercase.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/value.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/core/values/weekday.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/README.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/doc/graphics/values/window.md +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/close.png +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_border.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_classes.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_condition.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_handler.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_keyboard.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_program.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/ec_value.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/easycoder/tick.png +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/json/graphics-demo.json +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/plugins/ec_keyboard.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/plugins/ec_p100.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/plugins/ec_pyside6.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/plugins/points.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/plugins/sql.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/pyproject.toml +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/benchmark.ecs +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/config.ecg +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/ec_keyboard.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/hello.ecs +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/points.ecs +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/scripts/tests.ecs +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/testrc.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/testsql.py +0 -0
- {easycoder-250826.2 → easycoder-250920.1}/testui.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250920.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>
|
|
@@ -211,7 +211,6 @@ class Compiler:
|
|
|
211
211
|
token = self.tokens[self.index]
|
|
212
212
|
keyword = token.token
|
|
213
213
|
if self.debugCompile: print(self.script.lines[token.lino])
|
|
214
|
-
# print(f'{keyword} - {line}')
|
|
215
214
|
# if keyword != 'else':
|
|
216
215
|
if self.compileOne() == True:
|
|
217
216
|
if self.index == len(self.tokens) - 1:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import json, math, hashlib, threading, os, subprocess, time
|
|
2
2
|
import numbers, base64, binascii, random, requests, paramiko
|
|
3
|
+
from copy import deepcopy
|
|
3
4
|
from psutil import Process
|
|
4
5
|
from datetime import datetime
|
|
5
6
|
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Condition, Object
|
|
@@ -276,7 +277,7 @@ class Core(Handler):
|
|
|
276
277
|
return self.incdec(command, '-')
|
|
277
278
|
|
|
278
279
|
# Delete a file or a property
|
|
279
|
-
# delete {filename}
|
|
280
|
+
# delete file {filename}
|
|
280
281
|
# delete property {value} of {variable}
|
|
281
282
|
# delete element {name} of {variable}
|
|
282
283
|
def k_delete(self, command):
|
|
@@ -305,8 +306,8 @@ class Core(Handler):
|
|
|
305
306
|
type = command['type']
|
|
306
307
|
if type == 'file':
|
|
307
308
|
filename = self.getRuntimeValue(command['filename'])
|
|
308
|
-
if
|
|
309
|
-
os.remove(filename)
|
|
309
|
+
if filename != None:
|
|
310
|
+
if os.path.isfile(filename): os.remove(filename)
|
|
310
311
|
elif type == 'property':
|
|
311
312
|
key = self.getRuntimeValue(command['key'])
|
|
312
313
|
symbolRecord = self.getVariable(command['var'])
|
|
@@ -1076,7 +1077,7 @@ class Core(Handler):
|
|
|
1076
1077
|
return False
|
|
1077
1078
|
|
|
1078
1079
|
def r_push(self, command):
|
|
1079
|
-
value = self.getRuntimeValue(command['value'])
|
|
1080
|
+
value = deepcopy(self.getRuntimeValue(command['value']))
|
|
1080
1081
|
stackRecord = self.getVariable(command['to'])
|
|
1081
1082
|
if stackRecord['keyword'] != 'stack':
|
|
1082
1083
|
RuntimeError(self.program, f'{stackRecord["name"]} is not a stack')
|
|
@@ -1503,8 +1504,11 @@ class Core(Handler):
|
|
|
1503
1504
|
ssh = paramiko.SSHClient()
|
|
1504
1505
|
target['ssh'] = ssh
|
|
1505
1506
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
1506
|
-
|
|
1507
|
-
|
|
1507
|
+
try:
|
|
1508
|
+
ssh.connect(host, username=user, password=password, timeout=10)
|
|
1509
|
+
target['sftp'] = ssh.open_sftp()
|
|
1510
|
+
except:
|
|
1511
|
+
target['error'] = f'Unable to connect to {host} (timeout)'
|
|
1508
1512
|
return self.nextPC()
|
|
1509
1513
|
|
|
1510
1514
|
# Shuffle a list
|
|
@@ -2108,14 +2112,24 @@ class Core(Handler):
|
|
|
2108
2112
|
return value
|
|
2109
2113
|
|
|
2110
2114
|
if token == 'error':
|
|
2111
|
-
|
|
2115
|
+
token = self.peek()
|
|
2116
|
+
if token == 'code':
|
|
2112
2117
|
self.nextToken()
|
|
2113
2118
|
value['item'] = 'errorCode'
|
|
2114
2119
|
return value
|
|
2115
|
-
|
|
2120
|
+
elif token == 'reason':
|
|
2116
2121
|
self.nextToken()
|
|
2117
2122
|
value['item'] = 'errorReason'
|
|
2118
2123
|
return value
|
|
2124
|
+
elif token in ['in', 'of']:
|
|
2125
|
+
self.nextToken()
|
|
2126
|
+
if self.nextIsSymbol():
|
|
2127
|
+
record = self.getSymbolRecord()
|
|
2128
|
+
if record['keyword'] == 'ssh':
|
|
2129
|
+
value['item'] = 'sshError'
|
|
2130
|
+
value['name'] = record['name']
|
|
2131
|
+
return value
|
|
2132
|
+
return None
|
|
2119
2133
|
|
|
2120
2134
|
if token == 'type':
|
|
2121
2135
|
if self.nextIs('of'):
|
|
@@ -2279,6 +2293,10 @@ class Core(Handler):
|
|
|
2279
2293
|
elif v['item'] == 'errorReason':
|
|
2280
2294
|
value['type'] = 'text'
|
|
2281
2295
|
value['content'] = errorReason
|
|
2296
|
+
elif v['item'] == 'sshError':
|
|
2297
|
+
record = self.getVariable(v['name'])
|
|
2298
|
+
value['type'] = 'text'
|
|
2299
|
+
value['content'] = record['error'] if 'error' in record else ''
|
|
2282
2300
|
return value
|
|
2283
2301
|
|
|
2284
2302
|
def v_files(self, v):
|
|
@@ -2430,7 +2448,7 @@ class Core(Handler):
|
|
|
2430
2448
|
def v_now(self, v):
|
|
2431
2449
|
value = {}
|
|
2432
2450
|
value['type'] = 'int'
|
|
2433
|
-
value['content'] =
|
|
2451
|
+
value['content'] = int(time.time())
|
|
2434
2452
|
return value
|
|
2435
2453
|
|
|
2436
2454
|
def v_position(self, v):
|
|
@@ -2613,12 +2631,25 @@ class Core(Handler):
|
|
|
2613
2631
|
def compileCondition(self):
|
|
2614
2632
|
condition = Condition()
|
|
2615
2633
|
|
|
2616
|
-
|
|
2634
|
+
token = self.getToken()
|
|
2635
|
+
|
|
2636
|
+
if token == 'not':
|
|
2617
2637
|
condition.type = 'not'
|
|
2618
2638
|
condition.value = self.nextValue()
|
|
2619
2639
|
return condition
|
|
2620
2640
|
|
|
2621
|
-
|
|
2641
|
+
elif token == 'error':
|
|
2642
|
+
self.nextToken()
|
|
2643
|
+
self.skip('in')
|
|
2644
|
+
if self.nextIsSymbol():
|
|
2645
|
+
record = self.getSymbolRecord()
|
|
2646
|
+
if record['keyword'] == 'ssh':
|
|
2647
|
+
condition.type = 'sshError'
|
|
2648
|
+
condition.target = record['name']
|
|
2649
|
+
return condition
|
|
2650
|
+
return None
|
|
2651
|
+
|
|
2652
|
+
elif token == 'file':
|
|
2622
2653
|
path = self.nextValue()
|
|
2623
2654
|
condition.path = path
|
|
2624
2655
|
condition.type = 'exists'
|
|
@@ -2798,6 +2829,13 @@ class Core(Handler):
|
|
|
2798
2829
|
|
|
2799
2830
|
def c_odd(self, condition):
|
|
2800
2831
|
return self.getRuntimeValue(condition.value1) % 2 == 1
|
|
2832
|
+
|
|
2833
|
+
def c_sshError(self, condition):
|
|
2834
|
+
target = self.getVariable(condition.target)
|
|
2835
|
+
errormsg = target['error'] if 'error' in target else None
|
|
2836
|
+
condition.errormsg = errormsg
|
|
2837
|
+
test = errormsg != None
|
|
2838
|
+
return not test if condition.negate else test
|
|
2801
2839
|
|
|
2802
2840
|
def c_starts(self, condition):
|
|
2803
2841
|
value1 = self.getRuntimeValue(condition.value1)
|
|
@@ -81,6 +81,7 @@ class Graphics(Handler):
|
|
|
81
81
|
def __init__(self):
|
|
82
82
|
super().__init__()
|
|
83
83
|
self.multiline = False
|
|
84
|
+
self.container = None
|
|
84
85
|
|
|
85
86
|
def setContainer(self, container):
|
|
86
87
|
self.container = container
|
|
@@ -96,6 +97,7 @@ class Graphics(Handler):
|
|
|
96
97
|
def __init__(self):
|
|
97
98
|
super().__init__()
|
|
98
99
|
self.multiline = True
|
|
100
|
+
self.container = None
|
|
99
101
|
|
|
100
102
|
def setContainer(self, container):
|
|
101
103
|
self.container = container
|
easycoder-250826.2/test.py
DELETED
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|