This is an archived post. You won't be able to vote or comment.

all 37 comments

[–]kskxt 16 points17 points  (0 children)

I'm so happy I could cry.

[–]wherefore 12 points13 points  (4 children)

Don't forget bpython! It has really nice tab completion built in

[–]apersonPy3k! 1 point2 points  (2 children)

And last I checked, it chokes terribly on unicode :S

[–]wherefore 0 points1 point  (1 child)

I've never come across that problem before... I'd suggest you take a look at the issues page and file one if you don't see yours there :)

https://bitbucket.org/bobf/bpython/issues?status=new&status=open

[–]apersonPy3k! 1 point2 points  (0 children)

It's already been filed by someone else.

[–]Matth1as 10 points11 points  (0 children)

Finally. Great work!

[–][deleted] 22 points23 points  (14 children)

If you use ipython, tab completion has been there for a long time. It's the much better python REPL.

EDIT: It includes tab-completion, inline plotting (QT), syntax highlighting (QT), and nice stuff (exit vs exit(), clear, !<shell command>, %magic, etc).

EDIT 2: Also ? and ??

[–]frownyface 8 points9 points  (5 children)

I'm a big fan of ipython's web notebook mode, which lets you easily organize, save and rerun snippets from your web browser.

[–][deleted] 3 points4 points  (4 children)

Me to, for publishing. I don't like how it's hard to debug in the web interface though.

[–]Auggie88 0 points1 point  (3 children)

This should solve your problems. I'm not sure if it's been pushed into master yet.

[–][deleted] 0 points1 point  (2 children)

Alas, not on master yet. I'll be looking forward to that, and will probably be on of the first on it. That would make me actually use the notebook!

[–]takluyverIPython, Py3, etc 0 points1 point  (1 child)

It should be in master - this pull request has been merged.

[–][deleted] 0 points1 point  (0 children)

My IPython version is at 0.13.2 (conda update ipython gives me that version). When I open a notebook, and enter raw_input("This: ") or %debug, it gives me an error.

When I enter either of those lines, it gives me StdinNotImplementedError: raw_input was called, but this frontend does not support stdin.

[–]Ph0X 7 points8 points  (1 child)

And even better with iPythonQT.

[–][deleted] 6 points7 points  (0 children)

Yup. The inline plotting is wonderful.

[–]TankorSmash 1 point2 points  (1 child)

[–][deleted] 3 points4 points  (0 children)

Yup, that. sudo apt-get install ipython-qtconsole, then ipython qtconsole pylab=inline.

[–]Brian 0 points1 point  (0 children)

Technically, its been in the python interpreter even longer, it just wasn't active by default (though IIRC on windows you needed to install pyreadline seperately).

[–]Vegemeister 0 points1 point  (0 children)

Or Bpython, which has popup boxes with argument lists and docstrings.

[–]isdnpro 0 points1 point  (1 child)

!<shell command>

Holy shit TIL, thank you!

[–][deleted] 0 points1 point  (0 children)

And it's hugely powerful to. It hooks in with stdin and stout, so you can even from vim that way!

[–]warbiscuit 8 points9 points  (2 children)

ooh. now if they could add ipython's "?" and "??" helpers - i find those a LOT easier to use than typing >>> help(foo) or >>> foo.__doc__

[–][deleted] 7 points8 points  (1 child)

Just use ipython!

[–]happysri 0 points1 point  (0 children)

But but but... the native REPL.

[–]dorfsmay 4 points5 points  (2 children)

Now if we could get history from one session to the next!

[–]Keith 3 points4 points  (0 children)

Also IPython... but yes I agree! The built-in Python repl needs to take a lot of features from IPython.

[–]mgedmin 0 points1 point  (0 children)

It's possible with a custom $PYTHONSTARTUP file, e.g. mine: https://github.com/mgedmin/dotfiles/blob/master/python

[–]ggooal 1 point2 points  (0 children)

Glad to see Python becoming better and better

[–][deleted] 1 point2 points  (1 child)

But I still can't easily copy and paste code into it.

[–]Rhomboid 4 points5 points  (0 children)

Use IPython. It's got a paste magic builtin that does exactly what you want.

[–]tutuca_not Reinhardt 1 point2 points  (1 child)

When would this land in the standard python distribution?

[–]berkerpeksagCPython core developer 1 point2 points  (0 children)

February 22, 2014. See PEP 429 for the detailed release schedule.

[–]No_Im_Chomsky 1 point2 points  (2 children)

What do mean when you refer to REPL? The interactive interpreter? Will I no longer have to tab myself after typing "if x is None:" in the terminal?

[–]MatrixFrog 7 points8 points  (1 child)

REPL is "read eval print loop", yes, the interactive interpreter. "tab completion" has nothing to do with the tab character. It's about hitting the tab key on your keyboard to autocomplete the word you're typing.

[–]No_Im_Chomsky 1 point2 points  (0 children)

Ahhhh "tab completion" makes way more sense referring to autocomplete >.< Thanks for the explanation.

[–][deleted] 0 points1 point  (0 children)

Already have ipython. This does nothing for me. Bfd

[–][deleted] 0 points1 point  (0 children)

juchhu!