Skip to content

Running scripts in sub-folders in interactive mode breaks imports #88

@ikanobori

Description

@ikanobori

Minimal test case:
mkdir test && cd test && mkdir subtest && echo "a = 0" > subtest/config.py && echo "from config import a" > subtest/test.py

Running bpython -i subtest/test.py should yield an interpreter with variable a=0. However, it yields

Traceback (most recent call last):
File "subtest/test.py", line 1, in
from config import a
ImportError: No module named config

Running bpython subtest/test.py gives the expected result (no errors), python -i subtest/test.py also gives the expected result (a shell with variable a=0)


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions