Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing docs for --entrypoint #9

Open
teodorlu opened this issue Jul 3, 2022 · 0 comments
Open

Missing docs for --entrypoint #9

teodorlu opened this issue Jul 3, 2022 · 0 comments

Comments

@teodorlu
Copy link
Owner

teodorlu commented Jul 3, 2022

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 :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant