Skip to main content

Its the brodcast feture from scratch in python bacicly

Project description

Brodcast

what is this

Do you know the scrach brodcast block, its that but in python

documentation

function action example
@brodcast.on(name) Put this above the function you want to activate with brodcast replace the name variable with the name you want the variable to call said function
@brodcast.on("test") 
    def check(): 
        print("this works")

brodcast.cont("test") 
brodcast.cont(name) This command will activate all fuctions assigned to the name variable and continue withount waiting
import time

@brodcast.on("test") 
    def check(): 
        time.sleep(1)
        print("This is second")

brodcast.cont("test") 
print("This is first")
brodcast.wait(name) This command is like brodcast.con but will wait for all of the functions to finish before continueing
import time

@brodcast.on("test") 
def check(): 
    time.sleep(1)
    print("This is first")

brodcast.cont("test") 
print("This is second")
brodcast.debug() This command is used for
@brodcast.on("a")
def my_func():
    print("this function exists")

if "a" in brodcast.debug():
    print("you should see this")
    # this tag is on my_func

if "b" in brodcast.debug():
    print("and not this")
    # this tag is on nothing

brodcast also supports threding aplications

change = False

@brodcast.on("test")
def my_func():
    global change
    print("a")
    change = True
    while change:
        time.sleep(.1)
    print("c")

@brodcast.on("test")
def my_func2():
    global change
    while not change:
        time.sleep(.1)
    print("b")
    change = False
    

brodcast.wait("test")  
print()
print("done")
# outputs a, b, c, then done

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezbroadcast-0.0.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

ezbroadcast-0.0.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file ezbroadcast-0.0.1.tar.gz.

File metadata

  • Download URL: ezbroadcast-0.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ezbroadcast-0.0.1.tar.gz
Algorithm Hash digest
SHA256 da1ef17b874a1ed01d8e65e300311334f7d7cef01b38caa9abb471ea8f6822fa
MD5 c9dd462c5e0dd1c5f1496822cf2c6d05
BLAKE2b-256 71d64c6bcc4f4bc194dc9337dc71897de83627f69f77a0a0c9241a0262100147

See more details on using hashes here.

File details

Details for the file ezbroadcast-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ezbroadcast-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ezbroadcast-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e424f85cf2ab06d25ec644214f8415e16681dd248d091195ece533390fb54a8
MD5 1ab960179dfb4116e707ef999880715e
BLAKE2b-256 2d8f3c6bcda56b0be69b17cd6ffc9c18be15f27ed3a641035e071c2d76347a3a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page