entry

Functions

jnrbase.entry.entry_point(__func)[source]

Execute function when module is run directly.

Note

This allows fall through for importing modules that use it.

Parameters

__func (Callable[[None], int]) – Function to run

Return type

Optional[Callable[[None], int]]

Examples

>>> @entry_point
... def main():
...     return 255