11 ms·
Release of IPython 5.0
- xvilka 10y agoThanks to ipython, radare2 (reverse engineering framework) now has a very useful python shell with autocompletion: https://asciinema.org/a/16ko4jd1e6kdrqkqjxeu248hm https://asciinema.org/a/16ko4jd1e6kdrqkqjxeu248hm
- mkesper 10y agoThanks to prompt_toolkit, IPython now supports: Syntax highlighting as you type Real multi-line editing (up and down arrow keys move between lines) Multi-line paste without breaking indentation or immediately executing code Better code completion interface (we plan to improve that more) Optional mouse support
- quantumtremor 10y agoGlad to hear improvements to the shell ipython interface, especially up/down arrows on pasted code. The most interesting part of this for me is that IPython 6 will not support Python 2. >Projects such as Matplotlib and SymPy plan to drop support in the next few years, while a few projects like Scikit-Bio are already ahead of us, and should be Python 3 only soon. This was also very surprising for the standard reasons, especially for a library like matplotlib. Glad to find Python moving forward. But what will companies stuck on Python2 do? Will libraries like numpy, matplotlib, and scipy all maintain a Python2 LTS?
- mkesper 10y agoProbably until 2020 when Python 2 finally will be phased out. http://legacy.python.org/dev/peps/pep-0373/ http://legacy.python.org/dev/peps/pep-0373/
- daveguy 10y agoExcept Python 2 isn't going to be "phased out". Just support from Guido and company will end. Alternate support will continue on with fully compatible py2 implementations such as PyPy and pyston. "python" will still point to python2 on Linux distributions and Python distributions such as anaconda will still have the established, mature, fully functional python2 suite available.
- mfisher87 10y ago> "python" will still point to python2 on Linux distributions That's already false in many cases for at least a year. Arch and Gentoo come to mind.
- collinmanderson 10y agoSure, but it's true for both debian/ubuntu and fedora/rhel/centos.
- njharman 10y agoNo actually phasing out of Python 2 has already begun. Several libs today are Python 3 only. Many, many more are not going to pay the cost of supporting Python2 and drop it in next few years. Unless you are retiring next couple years or live with head in sand, any new code you write should either by python2-3 compatible (it's not hard at all, do it all day every day) or Python 3 only.
- collinmanderson 10y ago"support from Guido and company will end" - I find it very ironic that Guido's employer will keep supporting py2 (pyston).
- jdimov10 10y agoPython 2 isn't going anywhere anytime soon. Tools and libraries which drop support for Python 2 will suffer and will either revert their decision or be replaced with something else.
- Cyph0n 10y agoFound the Python 2 developer folks! Joking aside, Python 3 is the only Python. The only people who should use Python 2 are those supporting legacy codebases, and even they should start migrating.
- andybak 10y agoTricky one. I've just had to sell my clients on an update from Django < 1.8 as that fell out of it's support period. "Hey folks. I've got to do lots of work that will result in no new visible functionality and I'd like to be paid for it" I did consider slipping a Python 3 upgrade in there at the same time but there are limits to my powers of persuasion. So - Python 3 will have to wait.
- cuu508 10y agoHow about car oil changes for an analogy? You could probably drive for several oil change periods without apparent issues, until eventually there would be big issues. Django upgrades are similar, not "that" difficult, and it's a good idea not to fall too far back in versions, running into more and more incompatibilities. Py 2 -> 3 is a bigger one, so maybe like a timing belt change? ;-)
- jsmeaton 10y agoI don't do this kind of work (agency) but I find it strange that ongoing maintenance isn't discussed and priced into the statement of work right from the beginning. Something like 2 days maintenance every 9 months to stay current, or 4 days every 2-3 years to go from LTS to LTS. If a customer doesn't understand why they need to be paying maintenance every x months or years, isn't that your fault for not making that clear in the beginning? Sorry if it seems like I'm picking on you, but I've seen this kind of comment quite a lot, and I've never asked the question before.
- wodenokoto 10y agoCompanies stuck on python 2, have known for several years that life-time support was disappearing and will do 1 of 3 things: 1) Get caught by surprise because they aren't planning. 2) Plan and pay the price of upgrading their legacy code. 3) Join an active developed (currently hypothetical) fork of python 2 I think in 2020 we'll see all 3 routes done by several companies. Better get the popcorn ready!
- data_hope 10y agohttps://github.com/dropbox/pyston https://github.com/dropbox/pyston seems to be option 3
- sciurus 10y agoOr PyPy. It's development is still heavily focused on Python 2 because that's where the corporate sponsorship is.
- zokier 10y ago> 3) Join an active developed (currently hypothetical) fork of python 2 RedHat is probably going to keep Python2 on some degree of life-support at least until 2030 or so, just based on a guess that RHEL8 most likely will still have python2, and its support will continue for 10+ years after its release.
- zeroxfe 10y agoAlso: 4) migrate to other languages, such as Go ... which is not uncommon, and in many cases a pretty good idea.
- ubernostrum 10y agomigrate to other languages, such as Go This depends heavily on the type of work someone is doing. People doing numeric/scientific computing work with Python can't really do this, for example, because there's a distinct lack of other languages with equivalents to the libraries and tooling Python gives them for their work. And that's a chicken/egg feedback loop problem: Go needs the libraries and tools, but in order get them needs people to move, but in order to get people to move needs the libraries/tools, and so on.
- afarrell 10y agoCompanies using Numpy and Scipy who need python 2.x support will probably buy a support plan from someone like Continuum Analytics.
- wodenokoto 10y ago> It is important to note that users will always be able to use a Python 2 kernel with the Jupyter Notebook, even when all of our projects have transitioned to Python 3 The way I understand this is that you will need python 3 to open ipython 6, but once running, you can interact with python2 and run and inspect python 2 code. I think that is fine. I can't imagine a modern scientific setup that can't readily create python 2 and 3 virtual environments.
- carreau 10y agoNo, not really, When you start a notebook, you could have an IPython 6 - Python 3 kernel, OR an IPython 5 - Python 2 kernel. But Notebook & Jupyter != IPython
- wodenokoto 10y agoI thought that just like the notebook, IPython was a "view" into a python kernel. Is that wrongly understood?
- takluyver 10y agoIt's a bit confusing because parts of IPython became Jupyter. But since they split, IPython is two things: the Python kernel for Jupyter, and a terminal interface that uses the same core execution machinery within the process. So it will only be possible to run Python 3 code in IPython 6, but it will still be possible to use IPython 5 as a kernel for future versions of Jupyter.
- brbsix 10y agoThis is going to take some getting used-to. The visuals (specifically the syntax highlighting and code completion) are very reminiscent of bpython. On the other hand, I'm really happy to say farewell to readline. I've been stuck with readline v6.2.4.1 for ages just so I can have proper linewrap [0]. Of course this breaks virtualenv creation so you end up having to override the system readline [1]. Needless to say, this is well overdue. [0]: https://github.com/ipython/ipython/issues/3329/ https://github.com/ipython/ipython/issues/3329/ [1]: https://github.com/pypa/virtualenv/issues/4#issuecomment-966276 https://github.com/pypa/virtualenv/issues/4#issuecomment-966...
- thomasahle 10y agoAs someone who's never used ipython before, but used the standard python interactive terminal a lot, I'm very impressed! The best feature I've discovered so far, is that when I want to change a function, I can simply 'up arrow', and I get the whole thing! Not a single line of the function, as in the normal python terminal. And if I write a syntax error while typing the function, it tells me immediately! Does anybody have other examples of great features in ipython over the standard python terminal?
- stygiansonic 10y agoTab to autocomplete is pretty sweet.
- brbsix 10y agoYou can still get tab to complete with the standard Python interpreter. python3 -ic "import readline; import rlcompleter; readline.parse_and_bind('tab: complete')" Admittedly, IPython's is better.
- brbsix 10y agoFor one, you can just paste in a bunch of code. Try doing that in the standard terminal! Another feature I end up using constantly is the documentation support. Say you want to read the docstring for an object, just prefix or append a '?' to the object, e.g. 'subprocess?'. If you want to examine the source code for the object, just prefix or append '??', e.g. 'subprocess.call??'.
- thomasahle 10y ago> For one, you can just paste in a bunch of code. Try doing that in the standard terminal! Usually I can paste code just fine, I think? As long as the indentation is correct and I have double blank lines between functions, etc. > Say you want to read the docstring for an object, just prefix or append a '?' to the object, e.g. 'subprocess?' Isn't that the same as typing `help(subprocess)` in the standard terminal? > If you want to examine the source code for the object, just prefix or append '??', e.g. 'subprocess.call??'. That's pretty cool :-)
- ferdinandvwyk 10y agoMultiline support - my prayers have been answered! Copying/pasting code and modifying multiline commands from your history was easily the most annoying thing about ipython.
- thuruv 10y agoDamn, the storm already hit python 2.x. Have to move on.
- tbarbugli 10y ago"The awkward dependencies on pyreadline for Windows and gnureadline for Mac prompted Thomas Kluyver to replace the old machinery with a brand new pure-python readline replacement: prompt_toolkit." I was waiting for something like this for years!
- ppod 10y agoThere is a particular behaviour in RStudio that I would really love to be able to do in python, but haven't found the combination of IDE/or notebook that will do it yet: I want to execute through lines with cmd-return, or by highlighting and pressing cmd-return, and then see the change in the variables in a separate pane, like RStudio's environment pane. Bonus points if I can click on table variables in the environment pane and examine them in a separate tab with sorting and searching. Spyder comes closest but the execution part doesn't work as fluidly.
- aeroevan 10y agoSounds like you're looking for something like: https://github.com/yhat/rodeo https://github.com/yhat/rodeo
- denfromufa 10y agoAlso spyder: https://github.com/spyder-ide/spyder https://github.com/spyder-ide/spyder
- ppod 10y agoAh! I saw a very early version of that but never tried it, looks great! Thanks.
- spot 10y agowhy do you want the results in a separate pane instead of in the notebook right below the code? can you explain this in more detail? this might be an upcoming feature for beaker notebook (it definitely has the tables with sorting and searching).
- wodenokoto 10y agoWhen you clear the output of a cell, the variables lives on. Also a cell might change several variables but not print it. It is extremely handy to have a spreadsheet like "variable explorer" handy to get an overview of what you have in memory and what your numbers look like and a feature that I miss from rStudio.
- ericjang 10y agoKudos to the iPython / Jupyter team for spearheading such an important dev-productivity tool. I use your software all the time. I also appreciate the effort to migrate everybody to Python3.
- bobwaycott 10y agoSyntax highlighting and line navigation look awesome. The big news is this is the last release to support Python 2.x. Oh, and no more readline. Thank the gods.
- aliencat 10y agoIs there a way to enable vi mode in iPython 5? Since it no longer depends on readline library, putting `set editing-mode vi` in ~/.inputrc file no longer seems to work.
- farmerj 10y agoTwitching on the floor... blinky blinky cursor, is there no way to make it go away..? looks in the feature list. Went back to 4.
- carreau 10y agoThat's a terminal preference. E.G: iterm> Preference > Text > Blink Cursor -> uncheck it. Tada !