Scratch_Syntax
This is a custom Python library designed to make python syntax more like scratch.
Installation
pip install scratch_syntax
you can do anything with this library, mod it, break it, anything, but don't sue me
Update 0.2.0 notes
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
Updating
pip install --upgrade scratch_syntax
Update 0.3.0 notes
- I added the list functions
Update 0.4.0 notes
-
Added new say_for_seconds() function
-
I also added Github Respitory
Update 0.5.0
- Added new
wait_until()function
Update 0.6.0. ReRun's UPDATE!!!
-
The return of classic repeats... in a different way!!!
-
Added new repeat_until() function!!!
-
Now needs the lambda function. etc:
repeat(lambda: say("hello!"), 5) forever(lambda: say("hiya!")) repeat_until(lambda: say("do you like this?"), lambda: condition())
Also btw don't forget to put from scratch_syntax import *so the functions run correctly as is
Update 0.7.0 notes. Keyboard update!!!
- Added keyboard function
when_key_pressed()!!!
Update 0.7.2 note:
- I changed the wait_until function a bit so now it goes
wait_until(condition)instead ofwait_until(action, condition)
Update 0.7.3:
- Made the
when_key_pressed()andwait_until()functions faster
UPDATE 0.7.4: minor fixes
- Fixed the
wait_unti()a bitl
Update 0.8.0: New function
- I added the
when_key_pressed_any()function - I fixed the
wait_until()function a bit
Update 0.8.1: Minor fix
- I just fixed the changelog... thats it.
All Functions
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(), when_key_pressed_any()
Also heres an example code
from scratch_syntax import *
say("welcome to this beautiful thing!")
ask("hmm what do you think? answer yes please ")
wait_until(answer() == "yes")
say("hahaha no way you said it!!!")
repeat_until(
lambda: (
say_for_seconds("hello guys!", 1),
ask("stop running?"),
),
lambda: answer() == "yes",
)
say("done!")
say("now it is time for us to part!")
repeat_until(lambda: ask("would you like to leave?"), lambda: answer() == "yes")
wait(1)
say("press any key to exit")
if when_key_pressed_any():
stop_all()
Metadata
Release files for scratch_syntax 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scratch_syntax-0.8.1.tar.gz | 4.0 kB | Without provenance | Details for scratch_syntax-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scratch_syntax-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for scratch_syntax-0.8.1-py3-none-any.whl |
Total release size: 8.3 kB
Release files / scratch_syntax-0.8.1.tar.gz
| Download URL | scratch_syntax-0.8.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf0785668a797ca4b20fa6c03d59112916989fda190e4bf6a9072f97bf088c79
|
|
BLAKE2b-256 checksum How to use checksums |
dbcad7236983350c8a0dda5736b0c9c3631963cac05f6fabf25b0ed9347b901e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / scratch_syntax-0.8.1-py3-none-any.whl
| Download URL | scratch_syntax-0.8.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e69fd7302692f1143feffd0ed90574b35ac36c5d29223bdbf4eb240ca0b1f955
|
|
BLAKE2b-256 checksum How to use checksums |
8d5709f1c0ad76865907ee53d088c553aa1bcfec07edcf5a2767bec5519d8661
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for scratch_syntax 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.