Skip to content

Missing docs for --entrypoint #9

@teodorlu

Description

@teodorlu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions