Skip to content

Run in scripts is incorrect when the main type is package or library #304

@dgarijo

Description

@dgarijo

For example, in pyLODE:
run: "python /home/dgarijo/Documents/GitHub/test_repos/pyLODE/pylode/cli.py"
but the cli.py script would be run through a module, as it's part of the main package.

If there is an __init.py__ in the folder, the script has to be run as a module (python -m path/to/module)
If there is no __init.py__, then it's a regular script.

Another example is in code_inspector: our evaluation scripts are executable as such because there is no __init.py__. The other scrips in the repo are modules or tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions