Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpython shell cannot import python namespace packages #835

Copy link
Copy link
@tbabej

Description

@tbabej
Issue body actions

In Python 3.3, python namespace packages were introduced [0] - namespace package is a virtual package whose contents can be distributed in various places along Python's PATH. TL;DR

Currently importing a namespace package in bpython fails with:

>>> import my_namespace
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    import my_namespace
ModuleNotFoundError: No module named 'my_namespace'

whereas the identical python distribution, just running native shell, produces:

>>> import my_namespace
>>> my_namespace
<module 'my_namespace' (namespace)> 

[0] https://www.python.org/dev/peps/pep-0420/

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.