Skip to content

Have code run conditionally on load() vs. command line #572

Closed
@pao

Description

To make interactive testing of Julia scripts easier and improve the ability to reuse components, it would be nice if there were an equivalent to Python's:

if __name__ == "__main__":
    #things

or Ruby's

if $0 == __FILE__
    # things
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    speculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions