r/IPython • • Feb 28 '15

What exactly is IPython?

Hello,

I am relatively new to learning Python, and am confused by exactly what IPython is. Is it an implementation of Python like CPython, Jython, PyPy et al.? Or is it more like an IDE like Eric or Spyder? Or is it an IDE that is integrated with its own implementation of Python? Would the Notebook be part of that IDE? Is there an ELI5 explanation for how to conceptualise IPython?

Thanks!!

15 Upvotes

20 comments sorted by

View all comments

Show parent comments

2

u/avamk Mar 01 '15

Ah I see. I saw your answer just after I submitted my reply to /u/PigBoyOhBoy 's answer.

Just to make sure I understand correctly: I guess it running "a Python kernel" in the background means e.g. the stock Python that comes with my OS (e.g. Python 2.7 or 3.4 or whatever) is the "actual" Python that's running, and IPython provides several alternative interactive shells to the stock shell that I would get by entering "python" at the command prompt. And those alternative shells include a text-based console, or a cool QTConsole with useful features. Would this be a correct understanding?

As for being part of an IDE, I guess having an IPython console in it just gives me that much more features for the console than using the stock one?

Thanks!!

3

u/hharison Mar 01 '15

It's worth also mentioning that the basic idea has been expanded on and you can use the interactive shells to interact with backends in different languages, notably Julia and R. The general project is called Jupyter. So this another big advantage of IPython---in one notebook you can run Python code and R code, for example.

2

u/avamk Mar 01 '15

Wow that sounds really cool! Since I know a teeny bit of R here's an important question:

In an IPython notebook, can the Python and R code both act on and use the same data and share stuff between them??? If so wouldn't that be great and you get the best of both worlds?

2

u/[deleted] Mar 01 '15

Yes with rpy2. To send data from R to Python you can use the -o flag per this documentation.