Skip to content

bpython cannot run directories with __main__.py. #530

Open
@gwk

Description

@gwk

python can execute directories with __main__.py; bpython cannot but should. repro:

$ mkdir test
$ touch test/__main__.py
$ python test # ok.
$ python3 test # ok.
$ bpython3 test # fails.
Traceback (most recent call last):
  File "/usr/local/bin/bpython3", line 9, in <module>
    load_entry_point('bpython==0.15.dev106', 'console_scripts', 'bpython')()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/bpython/curtsies.py", line 69, in main
    bpargs.exec_code(interp, exec_args)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/bpython/args.py", line 113, in exec_code
    with open(args[0], 'r') as sourcefile:
IsADirectoryError: [Errno 21] Is a directory: 'test'

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