← Winnitude! Search  ·  Reader Mode (2032 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 8 LINKS

`-i` and `-c <code>`? · Issue #994 · bpython/bpython

Repository navigation

-i and -c <code>?  #994


New issue

New issue

Open

Open
-i and -c <code>? #994 Labels
enhancement

Description

@fferri's profile fferri opened on Jul 12, 2023

Running:

bpython -c 'from mymodule import *' -i

imports the desiret items correctly, but then doesn't drop into the python shell (it quits instead).

Reversing the order of arguments:

bpython -i -c 'from mymodule import *'

has a "strange" effect: the bpython banner (the line with bpython & python version) is not printed anymore, also $PYTHONSTARTUP is ignored, and all the nice ncurses-based highlighting and completion functionalities are disabled. Is this the intended behavior? Why?

Currently, to automate importing a module (e.g. for doing interactive testing during development on that module) I have to put my import line in a file, and do bpython -i import_mymodule.py. (I tend to use $PYTHONSTARTUP just for importing some commonly used modules).

Metadata

Metadata

Assignees

No one assigned

    Labels


    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions