easycoder 250614.1__py2.py3-none-any.whl → 250621.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__ = "250614.1"
12
+ __version__ = "250621.1"
easycoder/ec_core.py CHANGED
@@ -357,6 +357,29 @@ class Core(Handler):
357
357
  self.putSymbolValue(target, value)
358
358
  return self.nextPC()
359
359
 
360
+ # download [binary] {url} to {path}
361
+ def k_download(self, command):
362
+ if self.nextIs('binary'):
363
+ command['binary'] = True
364
+ self.nextToken()
365
+ else: command['binary'] = False
366
+ command['url'] = self.getValue()
367
+ self.skip('to')
368
+ command['path'] = self.nextValue()
369
+ self.add(command)
370
+ return True
371
+
372
+ def r_download(self, command):
373
+ binary = command['binary']
374
+ url = self.getRuntimeValue(command['url'])
375
+ path = self.getRuntimeValue(command['path'])
376
+ mode = 'wb' if binary else 'w'
377
+ response = requests.get(url, stream=True)
378
+ with open(path, mode) as f:
379
+ for chunk in response.iter_content(chunk_size=8192):
380
+ if chunk: f.write(chunk)
381
+ return self.nextPC()
382
+
360
383
  # Dummy command for testing
361
384
  def k_dummy(self, command):
362
385
  self.add(command)
@@ -409,7 +432,6 @@ class Core(Handler):
409
432
  self.run(label)
410
433
  return next
411
434
 
412
- # Issue a REST GET request
413
435
  # get {variable) from {url} [or {command}]
414
436
  def k_get(self, command):
415
437
  if self.nextIsSymbol():
easycoder/ec_pyside.py CHANGED
@@ -920,9 +920,8 @@ class Graphics(Handler):
920
920
  message = data['message']
921
921
  if style == 'question':
922
922
  choice = QMessageBox.question(window, title, message)
923
- if choice == QMessageBox.Yes: result = 'Yes'
924
- else: result = 'No'
925
- if style == 'yesnocancel':
923
+ result = 'Yes' if choice == QMessageBox.Yes else 'No'
924
+ elif style == 'yesnocancel':
926
925
  choice = QMessageBox.question(
927
926
  window,
928
927
  title,
@@ -1,13 +1,15 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: easycoder
3
- Version: 250614.1
3
+ Version: 250621.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>
7
7
  Description-Content-Type: text/markdown
8
8
  Classifier: License :: OSI Approved :: MIT License
9
+ License-File: LICENSE
9
10
  Requires-Dist: pytz
10
11
  Requires-Dist: requests
12
+ Requires-Dist: psutil
11
13
  Requires-Dist: paramiko
12
14
  Requires-Dist: pyside6
13
15
  Project-URL: Home, https://github.com/easycoder/easycoder-py
@@ -1,16 +1,16 @@
1
1
  easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
2
- easycoder/__init__.py,sha256=X8cqa4tcFdHUaOMZam0R2B1mygs_CfvCqiNwscjbUb0,262
2
+ easycoder/__init__.py,sha256=ZLMQh33Kzc2Oj3UwsXzoige_KWbSpB4xzoZ6wVy9uIo,262
3
3
  easycoder/ec_classes.py,sha256=L6-6yWHDHw8yF9TGL4WWc4p1aUyXzYz6Gom7jJ43h8o,1823
4
4
  easycoder/ec_compiler.py,sha256=6X9Sy5hr9-Ek36XqWrHJ8Ct1fE5sw2hBLKKFMh2RfRs,5130
5
5
  easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
6
- easycoder/ec_core.py,sha256=iAlPNrVwzU84EO6zxJ-xVMh2WuYjiMtkXD_8ujezXHU,97806
6
+ easycoder/ec_core.py,sha256=EVXamc0uEF07N-LF7CBqJqYlJEZFRFimlmKp3Ps0Esg,98584
7
7
  easycoder/ec_handler.py,sha256=ohf3xUuWw_Qb5SZnulGtDhvCb11kvWtYfgbQTiOXpIY,2261
8
8
  easycoder/ec_program.py,sha256=IDpfq9oghFJMJyRD9uab31VOP5MOF4M7kcUVfDn7d4I,9992
9
- easycoder/ec_pyside.py,sha256=QFPu_5fW2XFBovOvbwOFwy6SlCKw1swdJfb-I0d-AE8,40342
9
+ easycoder/ec_pyside.py,sha256=1rby0Vbc-IffqdVakKcx1q39wma88ibwI14YuR6bp9k,40317
10
10
  easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
11
11
  easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
12
- easycoder-250614.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
13
- easycoder-250614.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
- easycoder-250614.1.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
15
- easycoder-250614.1.dist-info/METADATA,sha256=rfuMmyYRNLv8z6jf7Rw8dFT3atz1gITMaJHFV0Osmng,6853
16
- easycoder-250614.1.dist-info/RECORD,,
12
+ easycoder-250621.1.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
13
+ easycoder-250621.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
+ easycoder-250621.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
15
+ easycoder-250621.1.dist-info/METADATA,sha256=yWPQEheXBUbqr6D2e3gmJN-YszVCj07gHMuOlq-JrYo,6897
16
+ easycoder-250621.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.10.1
2
+ Generator: flit 3.12.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any