Metadata-Version: 2.4
Name: scratch_syntax
Version: 0.9.0
Summary: A syntax library designed to help scratch users transition to python
Author-email: Cade <cadey.matignas@gmail.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: keyboard>=0.1.0
Dynamic: license-file

# Scratch_Syntax

## This is a custom Python library designed to make python syntax more like scratch.

# Installation

```bash
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

```bash
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 Repository

## 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:

  ```python
  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 of `wait_until(action, condition)`

## Update 0.7.3:

- Made the `when_key_pressed()` and `wait_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.

## Update 0.9.0

- I added the `length_of()` function;
- I removed the github repo.

## All Functions

```bash
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(), length_of()
```

Also heres an example code

```python
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)
print(length_of("apple"))
say("press any key to exit")
if when_key_pressed_any():
    stop_all()
```
