bpython as python

27 views
Skip to first unread message

Mike

unread,
Apr 26, 2011, 10:00:42 PM4/26/11
to bpython
Hi,

I'm a bit lazy and can't be bothered to type out bpython every time
and tend to forget to, or forget to run it separately from the menu.
I really like using it though when I do remember. ;)

To alleviate the issue I made an alias for it in my shell, e.g.
python="bpython".

This mostly works fine, and as bpython says it passes arguments to
python it doesn't understand. The biggest problem I have is that it
takes over the -c option normally used to execute strings. I use that
one a lot and bpython unfortunately breaks it.

Is it possible to move the short options to unused letters, or perhaps
remove them in favor of only the long ones? Python itself doesn't
seem to recognize long options so it might be a good way to tackle the
problem.

Thanks if anyone can help.

Bob Farrell

unread,
Apr 27, 2011, 4:39:39 AM4/27/11
to bpy...@googlegroups.com
Hi Mike,

Glad to see somebody's using this feature of bpython - this is exactly
why I added it in the first place.

Shame I didn't anticipate this problem though - we tend to be a little
more thoughtful about things these days. :-)

Not sure what the best solution is here. My guess is that almost
nobody uses the `-c` option so, while I'm usually against the idea of
changing stuff like this, I think we can make an exception here as it
is an outright mistake to use it.

I'll let Andreas and Simon (and anybody else) chime in with their
thoughts but I'm giving a preliminary thumbs up for this.

Thanks for taking the time to report this - we'll hopefully have a
solution some time soon.

> --
> You received this message because you are subscribed to the Google Groups "bpython" group.
> To post to this group, send email to bpy...@googlegroups.com.
> To unsubscribe from this group, send email to bpython+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/bpython?hl=en.
>
>

Andreas Stührk

unread,
Apr 27, 2011, 6:38:40 PM4/27/11
to bpy...@googlegroups.com
Hello,

On Wed, Apr 27, 2011 at 8:39 AM, Bob Farrell
<robertanth...@gmail.com> wrote:
> Not sure what the best solution is here. My guess is that almost
> nobody uses the `-c` option so, while I'm usually against the idea of
> changing stuff like this, I think we can make an exception here as it
> is an outright mistake to use it.
>
> I'll let Andreas and Simon (and anybody else) chime in with their
> thoughts but I'm giving a preliminary thumbs up for this.

I agree with Mike and Bob. It was a bit stupid to use a (short) option
that is also used by Python. The only reason I can think of against
dropping it is backwards compatiblity. But then, as Bob stated, it is
likely that nobody uses "-c" anyway, as I can't really think of a
reason why people would use frequently different config files and even
if they do so, there is still the long option ("--config=…"). Hence
I'm in favour of dropping "-c", but we should document the change
sufficiently. I didn't check any other short options for clashes.

Regards,
Andreas

Mike

unread,
Apr 29, 2011, 5:53:30 PM4/29/11
to bpython
Thanks guys ;)
Reply all
Reply to author
Forward
0 new messages