hotload icon indicating copy to clipboard operation
hotload copied to clipboard

Missing docs for `--entrypoint`

Open teodorlu opened this issue 3 years ago • 0 comments

As noted in #6 .

entrypoint lets your specify a function that hotload should call after it's done reloading.

Example:

def plus(x, y):
    return x + 2

def hotload_entrypoint():
    print(plus(1,2))
    print(plus(10,20))

# now you can
#
#   ls | hotload script.py --entrypoint hotload_entrypoint
#
# to run your script, without checking for env vars and stuff :)

teodorlu avatar Jul 03 '22 20:07 teodorlu