scratch-syntax 0.7.2__tar.gz → 0.7.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.
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.4
2
+ Name: scratch_syntax
3
+ Version: 0.7.4
4
+ Summary: A syntax library designed to help scratch users transition to python
5
+ Author-email: Cade <cadey.matignas@gmail.com>
6
+ Project-URL: Homepage, https://github.com/cadeymatignas-source/scratch_syntax
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: keyboard>=0.1.0
14
+ Dynamic: license-file
15
+
16
+ # Scratch_Syntax
17
+
18
+ ## This is a custom Python library designed to make python syntax more like scratch.
19
+
20
+ # Installation
21
+
22
+ ```bash
23
+ pip install scratch_syntax
24
+ ```
25
+
26
+ you can do anything with this library, mod it, break it, anything, but don't sue me
27
+
28
+ ## Update 0.2.0 notes
29
+
30
+ I removed the forever and repeat functions because they didnt work and added the stop_all() function. You can use **for_ in range(): **for repeat and** while True:** for forever
31
+
32
+ # Updating
33
+
34
+ ```bash
35
+ pip install --upgrade scratch_syntax
36
+ ```
37
+
38
+ ## Update 0.3.0 notes
39
+
40
+ - I added the list functions
41
+
42
+ ## Update 0.4.0 notes
43
+
44
+ ### Added new say_for_seconds() function
45
+
46
+ - I also added Github Respitory
47
+
48
+ ## Update 0.5.0
49
+
50
+ - Added new wait_until() function
51
+
52
+ ## Update 0.6.0\. ReRun's UPDATE!!!
53
+
54
+ - The return of classic repeats... in a different way!!!
55
+ - Added new repeat_until() function!!!
56
+ - Now needs the lambda function. etc:
57
+
58
+ ```python
59
+ repeat(lambda: say("hello!"), 5)
60
+ forever(lambda: say("hiya!"))
61
+ repeat_until(lambda: say("do you like this?"), lambda: condition())
62
+ ```
63
+
64
+ Also btw don't forget to put from scratch_syntax import * so the functions run correctly as is
65
+
66
+ ## Update 0.7.0 notes. Keyboard update!!!
67
+
68
+ - Added keyboard function (when_key_pressed())!!!
69
+
70
+ ## Update 0.7.2 note:
71
+
72
+ - I changed the wait_until function a bit so now it goes `wait_until(condition)` instead of `wait_until(action, condition)`
73
+
74
+ ## Update 0.7.3:
75
+
76
+ - Made the `when_key_pressed()` and `wait_until()` functions faster
77
+
78
+ ## UPDATE 0.7.4: minor fixes
79
+
80
+ - Fixed the wait_until a bitl
81
+
82
+ ## All Functions
83
+
84
+ ```bash
85
+ say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer(), say_for_seconds(), wait_until(), repeat(), forever(), repeat_until(), when_key_pressed()
86
+ ```
87
+
88
+ Also heres an example code
89
+
90
+ ```python
91
+ from scratch_syntax import *
92
+
93
+ say("welcome to this beautiful thing!")
94
+ ask("hmm what do you think? answer yes please ")
95
+ wait_until(answer() == "yes")
96
+ say("hahaha no way you said it!!!")
97
+ repeat_until(
98
+ lambda: (
99
+ say_for_seconds("hello guys!", 1),
100
+ ask("stop running?"),
101
+ ),
102
+ lambda: answer() == "yes",
103
+ )
104
+ say("done!")
105
+ say("now it is time for us to part!")
106
+ repeat_until(lambda: ask("would you like to leave?"), lambda: answer() == "yes")
107
+ wait(1)
108
+ stop_all()
109
+ ```
@@ -0,0 +1,94 @@
1
+ # Scratch_Syntax
2
+
3
+ ## This is a custom Python library designed to make python syntax more like scratch.
4
+
5
+ # Installation
6
+
7
+ ```bash
8
+ pip install scratch_syntax
9
+ ```
10
+
11
+ you can do anything with this library, mod it, break it, anything, but don't sue me
12
+
13
+ ## Update 0.2.0 notes
14
+
15
+ I removed the forever and repeat functions because they didnt work and added the stop_all() function. You can use **for_ in range(): **for repeat and** while True:** for forever
16
+
17
+ # Updating
18
+
19
+ ```bash
20
+ pip install --upgrade scratch_syntax
21
+ ```
22
+
23
+ ## Update 0.3.0 notes
24
+
25
+ - I added the list functions
26
+
27
+ ## Update 0.4.0 notes
28
+
29
+ ### Added new say_for_seconds() function
30
+
31
+ - I also added Github Respitory
32
+
33
+ ## Update 0.5.0
34
+
35
+ - Added new wait_until() function
36
+
37
+ ## Update 0.6.0\. ReRun's UPDATE!!!
38
+
39
+ - The return of classic repeats... in a different way!!!
40
+ - Added new repeat_until() function!!!
41
+ - Now needs the lambda function. etc:
42
+
43
+ ```python
44
+ repeat(lambda: say("hello!"), 5)
45
+ forever(lambda: say("hiya!"))
46
+ repeat_until(lambda: say("do you like this?"), lambda: condition())
47
+ ```
48
+
49
+ Also btw don't forget to put from scratch_syntax import * so the functions run correctly as is
50
+
51
+ ## Update 0.7.0 notes. Keyboard update!!!
52
+
53
+ - Added keyboard function (when_key_pressed())!!!
54
+
55
+ ## Update 0.7.2 note:
56
+
57
+ - I changed the wait_until function a bit so now it goes `wait_until(condition)` instead of `wait_until(action, condition)`
58
+
59
+ ## Update 0.7.3:
60
+
61
+ - Made the `when_key_pressed()` and `wait_until()` functions faster
62
+
63
+ ## UPDATE 0.7.4: minor fixes
64
+
65
+ - Fixed the wait_until a bitl
66
+
67
+ ## All Functions
68
+
69
+ ```bash
70
+ say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer(), say_for_seconds(), wait_until(), repeat(), forever(), repeat_until(), when_key_pressed()
71
+ ```
72
+
73
+ Also heres an example code
74
+
75
+ ```python
76
+ from scratch_syntax import *
77
+
78
+ say("welcome to this beautiful thing!")
79
+ ask("hmm what do you think? answer yes please ")
80
+ wait_until(answer() == "yes")
81
+ say("hahaha no way you said it!!!")
82
+ repeat_until(
83
+ lambda: (
84
+ say_for_seconds("hello guys!", 1),
85
+ ask("stop running?"),
86
+ ),
87
+ lambda: answer() == "yes",
88
+ )
89
+ say("done!")
90
+ say("now it is time for us to part!")
91
+ repeat_until(lambda: ask("would you like to leave?"), lambda: answer() == "yes")
92
+ wait(1)
93
+ stop_all()
94
+ ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scratch_syntax"
7
- version = "0.7.2"
7
+ version = "0.7.4"
8
8
  authors = [
9
9
  { name="Cade", email="cadey.matignas@gmail.com" },
10
10
  ]
@@ -65,8 +65,8 @@ def replace_in_list(listname, index, item):
65
65
 
66
66
 
67
67
  def wait_until(condit):
68
- while not condit:
69
- sleep(1)
68
+ while not condit():
69
+ sleep(0.01)
70
70
 
71
71
 
72
72
  def repeat(action, timy):
@@ -90,7 +90,6 @@ def repeat_until(actionon, condition):
90
90
  def when_key_pressed(key):
91
91
  """This function checks when key is pressed"""
92
92
  if is_pressed(key):
93
- while is_pressed(key):
94
- sleep(0.1)
93
+ sleep(0.01)
95
94
  return True
96
95
  return False
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.4
2
+ Name: scratch_syntax
3
+ Version: 0.7.4
4
+ Summary: A syntax library designed to help scratch users transition to python
5
+ Author-email: Cade <cadey.matignas@gmail.com>
6
+ Project-URL: Homepage, https://github.com/cadeymatignas-source/scratch_syntax
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: keyboard>=0.1.0
14
+ Dynamic: license-file
15
+
16
+ # Scratch_Syntax
17
+
18
+ ## This is a custom Python library designed to make python syntax more like scratch.
19
+
20
+ # Installation
21
+
22
+ ```bash
23
+ pip install scratch_syntax
24
+ ```
25
+
26
+ you can do anything with this library, mod it, break it, anything, but don't sue me
27
+
28
+ ## Update 0.2.0 notes
29
+
30
+ I removed the forever and repeat functions because they didnt work and added the stop_all() function. You can use **for_ in range(): **for repeat and** while True:** for forever
31
+
32
+ # Updating
33
+
34
+ ```bash
35
+ pip install --upgrade scratch_syntax
36
+ ```
37
+
38
+ ## Update 0.3.0 notes
39
+
40
+ - I added the list functions
41
+
42
+ ## Update 0.4.0 notes
43
+
44
+ ### Added new say_for_seconds() function
45
+
46
+ - I also added Github Respitory
47
+
48
+ ## Update 0.5.0
49
+
50
+ - Added new wait_until() function
51
+
52
+ ## Update 0.6.0\. ReRun's UPDATE!!!
53
+
54
+ - The return of classic repeats... in a different way!!!
55
+ - Added new repeat_until() function!!!
56
+ - Now needs the lambda function. etc:
57
+
58
+ ```python
59
+ repeat(lambda: say("hello!"), 5)
60
+ forever(lambda: say("hiya!"))
61
+ repeat_until(lambda: say("do you like this?"), lambda: condition())
62
+ ```
63
+
64
+ Also btw don't forget to put from scratch_syntax import * so the functions run correctly as is
65
+
66
+ ## Update 0.7.0 notes. Keyboard update!!!
67
+
68
+ - Added keyboard function (when_key_pressed())!!!
69
+
70
+ ## Update 0.7.2 note:
71
+
72
+ - I changed the wait_until function a bit so now it goes `wait_until(condition)` instead of `wait_until(action, condition)`
73
+
74
+ ## Update 0.7.3:
75
+
76
+ - Made the `when_key_pressed()` and `wait_until()` functions faster
77
+
78
+ ## UPDATE 0.7.4: minor fixes
79
+
80
+ - Fixed the wait_until a bitl
81
+
82
+ ## All Functions
83
+
84
+ ```bash
85
+ say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer(), say_for_seconds(), wait_until(), repeat(), forever(), repeat_until(), when_key_pressed()
86
+ ```
87
+
88
+ Also heres an example code
89
+
90
+ ```python
91
+ from scratch_syntax import *
92
+
93
+ say("welcome to this beautiful thing!")
94
+ ask("hmm what do you think? answer yes please ")
95
+ wait_until(answer() == "yes")
96
+ say("hahaha no way you said it!!!")
97
+ repeat_until(
98
+ lambda: (
99
+ say_for_seconds("hello guys!", 1),
100
+ ask("stop running?"),
101
+ ),
102
+ lambda: answer() == "yes",
103
+ )
104
+ say("done!")
105
+ say("now it is time for us to part!")
106
+ repeat_until(lambda: ask("would you like to leave?"), lambda: answer() == "yes")
107
+ wait(1)
108
+ stop_all()
109
+ ```
@@ -1,83 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: scratch_syntax
3
- Version: 0.7.2
4
- Summary: A syntax library designed to help scratch users transition to python
5
- Author-email: Cade <cadey.matignas@gmail.com>
6
- Project-URL: Homepage, https://github.com/cadeymatignas-source/scratch_syntax
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.8
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: keyboard>=0.1.0
14
- Dynamic: license-file
15
-
16
- # Scratch_Syntax
17
-
18
- ## This is a custom Python library designed make python syntax more like scratch.
19
-
20
- # Installation
21
-
22
- ```bash
23
-
24
- pip install scratch_syntax
25
-
26
- ```
27
-
28
- you can do anything with this library, mod it, break it, anything, but don't sue me
29
-
30
- ## Update 0.2.0 notes
31
-
32
- I removed the forever and repeat functions because they didnt work and added the stop_all() function. You can use **for _ in range():** for repeat and **while True:** for forever
33
-
34
- # Updating
35
-
36
- ```bash
37
-
38
- pip install --upgrade scratch_syntax
39
-
40
- ```
41
-
42
- ## Update 0.3.0 notes
43
- * I added the list functions
44
-
45
-
46
-
47
- ## Update 0.4.0 notes
48
-
49
- ### Added new say_for_seconds() function
50
-
51
- * I also added Github Respitory
52
-
53
- ## Update 0.5.0
54
- * Added new wait_until() function
55
-
56
-
57
- ## Update 0.6.0. ReRun's UPDATE!!!
58
- * The return of classic repeats... in a different way!!!
59
- * Added new repeat_until() function!!!
60
- * Now needs the lambda function. etc:
61
- ```bash
62
-
63
- repeat(lambda: say("hello!"), 5)
64
- forever(lambda: say("hiya!"))
65
- repeat_until(lambda: say("do you like this?"), lambda: condition())
66
-
67
- ```
68
-
69
- Also btw don't forget to put from scratch_syntax import * so the functions run correctly as is
70
-
71
- ## Update 0.7.0 notes. Keyboard update!!!
72
- * Added keyboard function (when_key_pressed())!!!
73
-
74
- ## Update 0.7.2 note:
75
- * I changed the wait_until function a bit so now it goes ```wait_until(condition) ``` instead of ```wait_until(action, condition)```
76
-
77
-
78
- # All Functions
79
-
80
- ```bash
81
- say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer(), say_for_seconds(), wait_until(), repeat(), forever(), repeat_until(), when_key_pressed()
82
-
83
- ```
@@ -1,68 +0,0 @@
1
- # Scratch_Syntax
2
-
3
- ## This is a custom Python library designed make python syntax more like scratch.
4
-
5
- # Installation
6
-
7
- ```bash
8
-
9
- pip install scratch_syntax
10
-
11
- ```
12
-
13
- you can do anything with this library, mod it, break it, anything, but don't sue me
14
-
15
- ## Update 0.2.0 notes
16
-
17
- I removed the forever and repeat functions because they didnt work and added the stop_all() function. You can use **for _ in range():** for repeat and **while True:** for forever
18
-
19
- # Updating
20
-
21
- ```bash
22
-
23
- pip install --upgrade scratch_syntax
24
-
25
- ```
26
-
27
- ## Update 0.3.0 notes
28
- * I added the list functions
29
-
30
-
31
-
32
- ## Update 0.4.0 notes
33
-
34
- ### Added new say_for_seconds() function
35
-
36
- * I also added Github Respitory
37
-
38
- ## Update 0.5.0
39
- * Added new wait_until() function
40
-
41
-
42
- ## Update 0.6.0. ReRun's UPDATE!!!
43
- * The return of classic repeats... in a different way!!!
44
- * Added new repeat_until() function!!!
45
- * Now needs the lambda function. etc:
46
- ```bash
47
-
48
- repeat(lambda: say("hello!"), 5)
49
- forever(lambda: say("hiya!"))
50
- repeat_until(lambda: say("do you like this?"), lambda: condition())
51
-
52
- ```
53
-
54
- Also btw don't forget to put from scratch_syntax import * so the functions run correctly as is
55
-
56
- ## Update 0.7.0 notes. Keyboard update!!!
57
- * Added keyboard function (when_key_pressed())!!!
58
-
59
- ## Update 0.7.2 note:
60
- * I changed the wait_until function a bit so now it goes ```wait_until(condition) ``` instead of ```wait_until(action, condition)```
61
-
62
-
63
- # All Functions
64
-
65
- ```bash
66
- say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer(), say_for_seconds(), wait_until(), repeat(), forever(), repeat_until(), when_key_pressed()
67
-
68
- ```
@@ -1,83 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: scratch_syntax
3
- Version: 0.7.2
4
- Summary: A syntax library designed to help scratch users transition to python
5
- Author-email: Cade <cadey.matignas@gmail.com>
6
- Project-URL: Homepage, https://github.com/cadeymatignas-source/scratch_syntax
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.8
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: keyboard>=0.1.0
14
- Dynamic: license-file
15
-
16
- # Scratch_Syntax
17
-
18
- ## This is a custom Python library designed make python syntax more like scratch.
19
-
20
- # Installation
21
-
22
- ```bash
23
-
24
- pip install scratch_syntax
25
-
26
- ```
27
-
28
- you can do anything with this library, mod it, break it, anything, but don't sue me
29
-
30
- ## Update 0.2.0 notes
31
-
32
- I removed the forever and repeat functions because they didnt work and added the stop_all() function. You can use **for _ in range():** for repeat and **while True:** for forever
33
-
34
- # Updating
35
-
36
- ```bash
37
-
38
- pip install --upgrade scratch_syntax
39
-
40
- ```
41
-
42
- ## Update 0.3.0 notes
43
- * I added the list functions
44
-
45
-
46
-
47
- ## Update 0.4.0 notes
48
-
49
- ### Added new say_for_seconds() function
50
-
51
- * I also added Github Respitory
52
-
53
- ## Update 0.5.0
54
- * Added new wait_until() function
55
-
56
-
57
- ## Update 0.6.0. ReRun's UPDATE!!!
58
- * The return of classic repeats... in a different way!!!
59
- * Added new repeat_until() function!!!
60
- * Now needs the lambda function. etc:
61
- ```bash
62
-
63
- repeat(lambda: say("hello!"), 5)
64
- forever(lambda: say("hiya!"))
65
- repeat_until(lambda: say("do you like this?"), lambda: condition())
66
-
67
- ```
68
-
69
- Also btw don't forget to put from scratch_syntax import * so the functions run correctly as is
70
-
71
- ## Update 0.7.0 notes. Keyboard update!!!
72
- * Added keyboard function (when_key_pressed())!!!
73
-
74
- ## Update 0.7.2 note:
75
- * I changed the wait_until function a bit so now it goes ```wait_until(condition) ``` instead of ```wait_until(action, condition)```
76
-
77
-
78
- # All Functions
79
-
80
- ```bash
81
- say(), ask(), wait(), pick_random_number_from(), stop_all(), add_to_list(), insert_in_list(), delete_from_list(), delete_all_from_list(), replace_from_list(), answer(), say_for_seconds(), wait_until(), repeat(), forever(), repeat_until(), when_key_pressed()
82
-
83
- ```
File without changes
File without changes