[SciPy-User] Is it good practice to use IPython notebooks as your Python IDE?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[SciPy-User] Is it good practice to use IPython notebooks as your Python IDE?

Brian Merchant
I need to write about 2000 lines worth of code (based on my last implementation of the project I am working on). I anticipate that I'll be using profilers (including line profilers), numpy, Numba, possibly Cython and almost definitely matplotlib animations. I will need to write my own classes, so my program isn't just going to be one long script.


Previously, I used Spyder for development, but I am wondering if it makes sense for one to use an IPython notebook alone. I am considering that option so that I force myself to program "literately" -- lots of headings, and nice comments. Graphs embedded to show the effects of optimizations, and so forth.

So far, I know that IPython might have some trouble with integrating in matplotlib animations, but that too is possible with a little research. Otherwise, I should be able to do everything else quite easily, including debugging, according to the IPython documentation. In fact, writing parallel code in IPython might be a very nice idea given how it seems to offer a lot of functionality in that direction.


Do people use IPython (notebooks) as a complete IDE often? If not, why not?

Kind regards,
Brian

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Andrew Nelson

I'm converted to pycharmm now, great ide for python.

On 15/03/2015 10:01 AM, "Brian Merchant" <[hidden email]> wrote:
I need to write about 2000 lines worth of code (based on my last implementation of the project I am working on). I anticipate that I'll be using profilers (including line profilers), numpy, Numba, possibly Cython and almost definitely matplotlib animations. I will need to write my own classes, so my program isn't just going to be one long script.


Previously, I used Spyder for development, but I am wondering if it makes sense for one to use an IPython notebook alone. I am considering that option so that I force myself to program "literately" -- lots of headings, and nice comments. Graphs embedded to show the effects of optimizations, and so forth.

So far, I know that IPython might have some trouble with integrating in matplotlib animations, but that too is possible with a little research. Otherwise, I should be able to do everything else quite easily, including debugging, according to the IPython documentation. In fact, writing parallel code in IPython might be a very nice idea given how it seems to offer a lot of functionality in that direction.


Do people use IPython (notebooks) as a complete IDE often? If not, why not?

Kind regards,
Brian

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Matthew Brett
In reply to this post by Brian Merchant
Hi,

On Sat, Mar 14, 2015 at 4:01 PM, Brian Merchant <[hidden email]> wrote:
>
> So far, I know that IPython might have some trouble with integrating in
> matplotlib animations, but that too is possible with a little research.
> Otherwise, I should be able to do everything else quite easily, including
> debugging, according to the IPython documentation. In fact, writing parallel
> code in IPython might be a very nice idea given how it seems to offer a lot
> of functionality in that direction.

I use the notebook a lot, but I don't use it as an IDE.

My usual workflow is to write code with my text editor, test at the
terminal and explore code at the IPython terminal.

When I want to demo or teach what I have done, then I usually make a notebook.

I find that writing substantial code in the notebook quickly makes me
lose focus on what I am trying to do.  It's partly that the notebook
is really not good enough as a code editor for serious coding work.
It is also the state in the notebook that makes it very easy to write
code that assumes variables that have since been deleted or renamed.

Also - if I want to write a reasonably long document of any type, I
really need my familiar text editor so that I am not distracted by the
process of editing, as I often am in the notebook.

So - I think the notebook is really ideal for demos, short and
informal explorations, and as a teaching tool, but I would personally
find it very distracting as an IDE.

Cheers,

Matthew
_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

josef.pktd


On Sat, Mar 14, 2015 at 7:08 PM, Matthew Brett <[hidden email]> wrote:
Hi,

On Sat, Mar 14, 2015 at 4:01 PM, Brian Merchant <[hidden email]> wrote:
>
> So far, I know that IPython might have some trouble with integrating in
> matplotlib animations, but that too is possible with a little research.
> Otherwise, I should be able to do everything else quite easily, including
> debugging, according to the IPython documentation. In fact, writing parallel
> code in IPython might be a very nice idea given how it seems to offer a lot
> of functionality in that direction.

I use the notebook a lot, but I don't use it as an IDE.

My usual workflow is to write code with my text editor, test at the
terminal and explore code at the IPython terminal.

When I want to demo or teach what I have done, then I usually make a notebook.

I find that writing substantial code in the notebook quickly makes me
lose focus on what I am trying to do.  It's partly that the notebook
is really not good enough as a code editor for serious coding work.
It is also the state in the notebook that makes it very easy to write
code that assumes variables that have since been deleted or renamed.

Also - if I want to write a reasonably long document of any type, I
really need my familiar text editor so that I am not distracted by the
process of editing, as I often am in the notebook.

So - I think the notebook is really ideal for demos, short and
informal explorations, and as a teaching tool, but I would personally
find it very distracting as an IDE.

That's also pretty much my experience and usage.

I got used to notebooks to try out and work on finished examples, and to try out code in PRs.

However, whenever I get into debugging code or developing new code, then I quickly get annoyed by missing features and switch back to spyder.

I currently have IDLE, spyder, eclipse/pydev and several notebooks open, plus a shell window for nosetests, and of course one for git. 
All for different purposes and use cases, but all related to statsmodels code development and review.
("Dis"iDE)

Jpsef
 

Cheers,

Matthew
_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Yuxiang Wang
Me too.

I tried to use IPython Notebooks as my IDE for a while, but probably
because that it is host in a browser, the shortcut key feature is not
as good, as specifically, I often mistakenly invoked the browser
shortcut. I also got experience of accidentally deleting code without
saving them.

So, I use notebooks when I collaborate with my colleagues and send
them code snippets (github + nbviewer); but for decent development, I
always use spyder.

Shawn

On Sat, Mar 14, 2015 at 7:17 PM,  <[hidden email]> wrote:

>
>
> On Sat, Mar 14, 2015 at 7:08 PM, Matthew Brett <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> On Sat, Mar 14, 2015 at 4:01 PM, Brian Merchant <[hidden email]>
>> wrote:
>> >
>> > So far, I know that IPython might have some trouble with integrating in
>> > matplotlib animations, but that too is possible with a little research.
>> > Otherwise, I should be able to do everything else quite easily,
>> > including
>> > debugging, according to the IPython documentation. In fact, writing
>> > parallel
>> > code in IPython might be a very nice idea given how it seems to offer a
>> > lot
>> > of functionality in that direction.
>>
>> I use the notebook a lot, but I don't use it as an IDE.
>>
>> My usual workflow is to write code with my text editor, test at the
>> terminal and explore code at the IPython terminal.
>>
>> When I want to demo or teach what I have done, then I usually make a
>> notebook.
>>
>> I find that writing substantial code in the notebook quickly makes me
>> lose focus on what I am trying to do.  It's partly that the notebook
>> is really not good enough as a code editor for serious coding work.
>> It is also the state in the notebook that makes it very easy to write
>> code that assumes variables that have since been deleted or renamed.
>>
>> Also - if I want to write a reasonably long document of any type, I
>> really need my familiar text editor so that I am not distracted by the
>> process of editing, as I often am in the notebook.
>>
>> So - I think the notebook is really ideal for demos, short and
>> informal explorations, and as a teaching tool, but I would personally
>> find it very distracting as an IDE.
>
>
> That's also pretty much my experience and usage.
>
> I got used to notebooks to try out and work on finished examples, and to try
> out code in PRs.
>
> However, whenever I get into debugging code or developing new code, then I
> quickly get annoyed by missing features and switch back to spyder.
>
> I currently have IDLE, spyder, eclipse/pydev and several notebooks open,
> plus a shell window for nosetests, and of course one for git.
> All for different purposes and use cases, but all related to statsmodels
> code development and review.
> ("Dis"iDE)
>
> Jpsef
>
>>
>>
>> Cheers,
>>
>> Matthew
>> _______________________________________________
>> SciPy-User mailing list
>> [hidden email]
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



--
Yuxiang "Shawn" Wang
Gerling Research Lab
University of Virginia
[hidden email]
+1 (434) 284-0836
https://sites.google.com/a/virginia.edu/yw5aj/
_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Athanasios Anastasiou-4

Hello all

The previous posts pretty much describe my experience too but here are a few more observations.

*) iPython notebooks are an ideal alternative to spreadsheet nomograms or "workbooks" in the style of Mathematica. An engineering design process for example can be captured once and re-used many times. (Or a draft for a paper or a tutorial or as a quick way to create web content).

*) A few modules will not work properly through iPython. This means that it will either not be possible to use it at all (I.e. multiple processes ) or that it will be too slow or that if the code fails at a minor point, the whole notebook will have to be restarted (I.e. if it involves db connection(s) ).

*) Creating a user interface with typical widgets is not exactly straightforward (I.e https://jakevdp.github.io/blog/2013/06/01/ipython-notebook-javascript-python-communication/ ) so, you would have to revert to using other means for that (possibly an ide with qt-designer or gtk-Glade or something).

*) A typical IDE will have facilities for file management, version control, refactoring, rich search and replace and others. You can still emulate some of these with different software up and running of course and through scripting. It's a matter of convenience and its trade offs.

IPython notebooks definitely have a place in the toolkit and are constantly evolving, but probably in parallel with IDEs rather than as alternatives.

All the best
AA

On 14 Mar 2015 23:23, "Yuxiang Wang" <[hidden email]> wrote:
Me too.

I tried to use IPython Notebooks as my IDE for a while, but probably
because that it is host in a browser, the shortcut key feature is not
as good, as specifically, I often mistakenly invoked the browser
shortcut. I also got experience of accidentally deleting code without
saving them.

So, I use notebooks when I collaborate with my colleagues and send
them code snippets (github + nbviewer); but for decent development, I
always use spyder.

Shawn

On Sat, Mar 14, 2015 at 7:17 PM,  <[hidden email]> wrote:
>
>
> On Sat, Mar 14, 2015 at 7:08 PM, Matthew Brett <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> On Sat, Mar 14, 2015 at 4:01 PM, Brian Merchant <[hidden email]>
>> wrote:
>> >
>> > So far, I know that IPython might have some trouble with integrating in
>> > matplotlib animations, but that too is possible with a little research.
>> > Otherwise, I should be able to do everything else quite easily,
>> > including
>> > debugging, according to the IPython documentation. In fact, writing
>> > parallel
>> > code in IPython might be a very nice idea given how it seems to offer a
>> > lot
>> > of functionality in that direction.
>>
>> I use the notebook a lot, but I don't use it as an IDE.
>>
>> My usual workflow is to write code with my text editor, test at the
>> terminal and explore code at the IPython terminal.
>>
>> When I want to demo or teach what I have done, then I usually make a
>> notebook.
>>
>> I find that writing substantial code in the notebook quickly makes me
>> lose focus on what I am trying to do.  It's partly that the notebook
>> is really not good enough as a code editor for serious coding work.
>> It is also the state in the notebook that makes it very easy to write
>> code that assumes variables that have since been deleted or renamed.
>>
>> Also - if I want to write a reasonably long document of any type, I
>> really need my familiar text editor so that I am not distracted by the
>> process of editing, as I often am in the notebook.
>>
>> So - I think the notebook is really ideal for demos, short and
>> informal explorations, and as a teaching tool, but I would personally
>> find it very distracting as an IDE.
>
>
> That's also pretty much my experience and usage.
>
> I got used to notebooks to try out and work on finished examples, and to try
> out code in PRs.
>
> However, whenever I get into debugging code or developing new code, then I
> quickly get annoyed by missing features and switch back to spyder.
>
> I currently have IDLE, spyder, eclipse/pydev and several notebooks open,
> plus a shell window for nosetests, and of course one for git.
> All for different purposes and use cases, but all related to statsmodels
> code development and review.
> ("Dis"iDE)
>
> Jpsef
>
>>
>>
>> Cheers,
>>
>> Matthew
>> _______________________________________________
>> SciPy-User mailing list
>> [hidden email]
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



--
Yuxiang "Shawn" Wang
Gerling Research Lab
University of Virginia
[hidden email]
<a href="tel:%2B1%20%28434%29%20284-0836" value="+14342840836">+1 (434) 284-0836
https://sites.google.com/a/virginia.edu/yw5aj/
_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Thomas Kluyver-2
On 15 March 2015 at 02:08, Athanasios Anastasiou <[hidden email]> wrote:
*) A few modules will not work properly through iPython. This means that it will either not be possible to use it at all (I.e. multiple processes ) or that it will be too slow or that if the code fails at a minor point, the whole notebook will have to be restarted (I.e. if it involves db connection(s) ).

Please let us (IPython) know about these kinds of cases. It may be that there are things for us to fix in IPython, or we may be able to work with package authors to avoid things like database connections that can only be reset by restarting the kernel.

Thanks,
Thomas

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Alistair Miles
In reply to this post by Brian Merchant
FWIW I use PyCharm for any heavy coding (refactoring support is particularly useful) but IPython notebooks for informal testing and exploration, in particular the %autoreload magic is very helpful as you can have any changes you make to functions/classes you are working on in PyCharm be immediately effective in the notebook without having to restart or reload modules manually.

Hth,
Alistair

On Saturday, March 14, 2015, Brian Merchant <[hidden email]> wrote:
I need to write about 2000 lines worth of code (based on my last implementation of the project I am working on). I anticipate that I'll be using profilers (including line profilers), numpy, Numba, possibly Cython and almost definitely matplotlib animations. I will need to write my own classes, so my program isn't just going to be one long script.


Previously, I used Spyder for development, but I am wondering if it makes sense for one to use an IPython notebook alone. I am considering that option so that I force myself to program "literately" -- lots of headings, and nice comments. Graphs embedded to show the effects of optimizations, and so forth.

So far, I know that IPython might have some trouble with integrating in matplotlib animations, but that too is possible with a little research. Otherwise, I should be able to do everything else quite easily, including debugging, according to the IPython documentation. In fact, writing parallel code in IPython might be a very nice idea given how it seems to offer a lot of functionality in that direction.


Do people use IPython (notebooks) as a complete IDE often? If not, why not?

Kind regards,
Brian


--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: [hidden email]
Tel: +44 (0)1865 287721


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Ghislain Antony Vaillant
On Saturday, March 14, 2015, Brian Merchant <[hidden email]> wrote:

> I need to write about 2000 lines worth of code (based on my last
> implementation of the project I am working on). I anticipate that I'll be
> using profilers (including line profilers), numpy, Numba, possibly Cython
> and almost definitely matplotlib animations. I will need to write my own
> classes, so my program isn't just going to be one long script.
>
>
> Previously, I used Spyder for development, but I am wondering if it makes
> sense for one to use an IPython notebook alone. I am considering that
> option so that I force myself to program "literately" -- lots of headings,
> and nice comments. Graphs embedded to show the effects of optimizations,
> and so forth.
>
> So far, I know that IPython might have some trouble with integrating in
> matplotlib animations, but that too is possible with a little research.
> Otherwise, I should be able to do everything else quite easily, including
> debugging, according to the IPython documentation. In fact, writing
> parallel code in IPython might be a very nice idea given how it seems to
> offer a lot of functionality in that direction.
>
>
> Do people use IPython (notebooks) as a complete IDE often? If not, why not?
>
> Kind regards,
> Brian
>


Hi Brian,

Do you find anything wrong with Spyder ? I use both IEP [1] and Spyder extensively
and find them pretty good for the use case you describe. However if you're looking for
more project-style features like refactoring tools, project views, VCS integration, etc...,
a full-featured IDE may be more appropriate, like PyCharm as kindly suggested by Alistair.


Cheers,
Ghis

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Brian Merchant
Hi all,

Thank you for the wonderful discussion. I especially enjoyed learning about IEP (which I had not heard of), and PyCharm (which I had simply disregarded in the past)!

Ghis: I don't find much wrong with Spyder, apart from occasional stability issues which are quickly fixed with a restart of the program, and thus are hardly a hassle. 

In the end, I have decided to use PyCharm (which I can get an academic license for!) *primarily* because it has nice built-in VCS integration -- just a convenience really, than an absolutely killer function, but one that is valuable to me.

I wanted to write code in a literate, and organized fashion. I thought IPython notebooks might be a good idea, but as mentioned by others, there are some issues with it. However, I think using a VCS to track and comment on changes made to code is just as good! PyCharm has excellent integration with git, including nice visual views of branches, merges etc. 

PyCharm also has integrated IPython notebook compatibility now, so if I occasionally want to write a couple of tests in a more literate fashion, I can do so. Then of course, there are all the other IDE features that PyCharm has covered in a more stable/polished fashion than Spyder. Spyder doesn't have refactoring functionality (as far as I know?), so PyCharm is quite nice there particularly.

Brian


On Fri, Mar 20, 2015 at 9:55 AM, Ghislain Vaillant <[hidden email]> wrote:
On Saturday, March 14, 2015, Brian Merchant <[hidden email]> wrote:

> I need to write about 2000 lines worth of code (based on my last
> implementation of the project I am working on). I anticipate that I'll be
> using profilers (including line profilers), numpy, Numba, possibly Cython
> and almost definitely matplotlib animations. I will need to write my own
> classes, so my program isn't just going to be one long script.
>
>
> Previously, I used Spyder for development, but I am wondering if it makes
> sense for one to use an IPython notebook alone. I am considering that
> option so that I force myself to program "literately" -- lots of headings,
> and nice comments. Graphs embedded to show the effects of optimizations,
> and so forth.
>
> So far, I know that IPython might have some trouble with integrating in
> matplotlib animations, but that too is possible with a little research.
> Otherwise, I should be able to do everything else quite easily, including
> debugging, according to the IPython documentation. In fact, writing
> parallel code in IPython might be a very nice idea given how it seems to
> offer a lot of functionality in that direction.
>
>
> Do people use IPython (notebooks) as a complete IDE often? If not, why not?
>
> Kind regards,
> Brian
>


Hi Brian,

Do you find anything wrong with Spyder ? I use both IEP [1] and Spyder extensively
and find them pretty good for the use case you describe. However if you're looking for
more project-style features like refactoring tools, project views, VCS integration, etc...,
a full-featured IDE may be more appropriate, like PyCharm as kindly suggested by Alistair.


Cheers,
Ghis

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user



_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it good practice to use IPython notebooks as your Python IDE?

Arnaldo Russo
Hi Brian,

If you are still looking for an IPython like IDE, I'd suggest to take a look at Rodeo (http://blog.yhathq.com/posts/introducing-rodeo.html)

Cheers,
Arnaldo.

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user