easycoder 250915.1__py2.py3-none-any.whl → 250920.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 +1 -1
- easycoder/ec_compiler.py +0 -1
- easycoder/ec_core.py +46 -9
- {easycoder-250915.1.dist-info → easycoder-250920.1.dist-info}/METADATA +1 -1
- {easycoder-250915.1.dist-info → easycoder-250920.1.dist-info}/RECORD +8 -8
- {easycoder-250915.1.dist-info → easycoder-250920.1.dist-info}/WHEEL +0 -0
- {easycoder-250915.1.dist-info → easycoder-250920.1.dist-info}/entry_points.txt +0 -0
- {easycoder-250915.1.dist-info → easycoder-250920.1.dist-info}/licenses/LICENSE +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_compiler.py
CHANGED
|
@@ -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:
|
easycoder/ec_core.py
CHANGED
|
@@ -277,7 +277,7 @@ class Core(Handler):
|
|
|
277
277
|
return self.incdec(command, '-')
|
|
278
278
|
|
|
279
279
|
# Delete a file or a property
|
|
280
|
-
# delete {filename}
|
|
280
|
+
# delete file {filename}
|
|
281
281
|
# delete property {value} of {variable}
|
|
282
282
|
# delete element {name} of {variable}
|
|
283
283
|
def k_delete(self, command):
|
|
@@ -306,8 +306,8 @@ class Core(Handler):
|
|
|
306
306
|
type = command['type']
|
|
307
307
|
if type == 'file':
|
|
308
308
|
filename = self.getRuntimeValue(command['filename'])
|
|
309
|
-
if
|
|
310
|
-
os.remove(filename)
|
|
309
|
+
if filename != None:
|
|
310
|
+
if os.path.isfile(filename): os.remove(filename)
|
|
311
311
|
elif type == 'property':
|
|
312
312
|
key = self.getRuntimeValue(command['key'])
|
|
313
313
|
symbolRecord = self.getVariable(command['var'])
|
|
@@ -1504,8 +1504,11 @@ class Core(Handler):
|
|
|
1504
1504
|
ssh = paramiko.SSHClient()
|
|
1505
1505
|
target['ssh'] = ssh
|
|
1506
1506
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
1507
|
-
|
|
1508
|
-
|
|
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)'
|
|
1509
1512
|
return self.nextPC()
|
|
1510
1513
|
|
|
1511
1514
|
# Shuffle a list
|
|
@@ -2109,14 +2112,24 @@ class Core(Handler):
|
|
|
2109
2112
|
return value
|
|
2110
2113
|
|
|
2111
2114
|
if token == 'error':
|
|
2112
|
-
|
|
2115
|
+
token = self.peek()
|
|
2116
|
+
if token == 'code':
|
|
2113
2117
|
self.nextToken()
|
|
2114
2118
|
value['item'] = 'errorCode'
|
|
2115
2119
|
return value
|
|
2116
|
-
|
|
2120
|
+
elif token == 'reason':
|
|
2117
2121
|
self.nextToken()
|
|
2118
2122
|
value['item'] = 'errorReason'
|
|
2119
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
|
|
2120
2133
|
|
|
2121
2134
|
if token == 'type':
|
|
2122
2135
|
if self.nextIs('of'):
|
|
@@ -2280,6 +2293,10 @@ class Core(Handler):
|
|
|
2280
2293
|
elif v['item'] == 'errorReason':
|
|
2281
2294
|
value['type'] = 'text'
|
|
2282
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 ''
|
|
2283
2300
|
return value
|
|
2284
2301
|
|
|
2285
2302
|
def v_files(self, v):
|
|
@@ -2614,12 +2631,25 @@ class Core(Handler):
|
|
|
2614
2631
|
def compileCondition(self):
|
|
2615
2632
|
condition = Condition()
|
|
2616
2633
|
|
|
2617
|
-
|
|
2634
|
+
token = self.getToken()
|
|
2635
|
+
|
|
2636
|
+
if token == 'not':
|
|
2618
2637
|
condition.type = 'not'
|
|
2619
2638
|
condition.value = self.nextValue()
|
|
2620
2639
|
return condition
|
|
2621
2640
|
|
|
2622
|
-
|
|
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':
|
|
2623
2653
|
path = self.nextValue()
|
|
2624
2654
|
condition.path = path
|
|
2625
2655
|
condition.type = 'exists'
|
|
@@ -2799,6 +2829,13 @@ class Core(Handler):
|
|
|
2799
2829
|
|
|
2800
2830
|
def c_odd(self, condition):
|
|
2801
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
|
|
2802
2839
|
|
|
2803
2840
|
def c_starts(self, condition):
|
|
2804
2841
|
value1 = self.getRuntimeValue(condition.value1)
|
|
@@ -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>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
easycoder/__init__.py,sha256=
|
|
1
|
+
easycoder/__init__.py,sha256=kWiWYZ-Agk6P3r4zV7TXSUdQAZ3Kgcivns14FJJmIQc,339
|
|
2
2
|
easycoder/close.png,sha256=3B9ueRNtEu9E4QNmZhdyC4VL6uqKvGmdfeFxIV9aO_Y,9847
|
|
3
3
|
easycoder/ec_border.py,sha256=KpOy0Jq8jI_6DYGo4jaFvoBP_jTIoAYWrmuHhl-FXA4,2355
|
|
4
4
|
easycoder/ec_classes.py,sha256=bejrby7mLHTeAQXhhz-1l8iv6LSbNSy30lW21KJKjXE,1832
|
|
5
|
-
easycoder/ec_compiler.py,sha256=
|
|
5
|
+
easycoder/ec_compiler.py,sha256=LYwGNs8dcHKXI_nnu1sVFe1N36vjvylcUO_tX_bLjrk,5359
|
|
6
6
|
easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
|
|
7
|
-
easycoder/ec_core.py,sha256=
|
|
7
|
+
easycoder/ec_core.py,sha256=6O9u923WCeK4U2hEPVPY1Zx1EgHdhfSr4y9KosuWW98,99514
|
|
8
8
|
easycoder/ec_handler.py,sha256=ED08ULiOlZkcs4XHxAguvdPZw_dFXuwGDFLbFuo0kLs,2317
|
|
9
9
|
easycoder/ec_keyboard.py,sha256=ru-HdWolBMZJPyck2s72In9tXFeLJQSPtR1TpjmIo90,18350
|
|
10
10
|
easycoder/ec_program.py,sha256=3KM9n_SAChUgUnRxhPCnA75K2FP1fgxjW8z1YUA3cL4,10140
|
|
@@ -12,8 +12,8 @@ easycoder/ec_pyside.py,sha256=bnGwnlYyN-4KI4ECpocrgVx2uGO_9aDrDZNjT4AK7ak,54148
|
|
|
12
12
|
easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
|
|
13
13
|
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
14
14
|
easycoder/tick.png,sha256=OedASXJJTYvnza4J6Kv5m5lz6DrBfy667zX_WGgtbmM,9127
|
|
15
|
-
easycoder-
|
|
16
|
-
easycoder-
|
|
17
|
-
easycoder-
|
|
18
|
-
easycoder-
|
|
19
|
-
easycoder-
|
|
15
|
+
easycoder-250920.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
16
|
+
easycoder-250920.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
17
|
+
easycoder-250920.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
|
|
18
|
+
easycoder-250920.1.dist-info/METADATA,sha256=EdjNgyIApW7KyP9S4TfI87vBkC3Ru8dVlTs6oqkucHk,6897
|
|
19
|
+
easycoder-250920.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|