Skip to content

-i and -c <code>? #994

@fferri

Description

@fferri

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions