[Tutor] Coming from R, what's a good IDE editor? I've tried PyCharm and Spyder

Mats Wichmann mats at wichmann.us
Fri Jun 2 20:14:06 EDT 2017


On 06/02/2017 11:46 AM, C W wrote:
> Dear Python list,
> 
> I am an R user learning Python. What is a good editor?
> 
> 1) Pycharm
> PyCharm evaluates the entire script, I just want to change a few lines in
> the script.
> For example,
> 
> import matplotlib.pyplot as plt
> import numpy as np
> 
> x = np.arange(0, 1,0.1)
> y = np.sin(2 * np.pi * x)
> 
> plt.figure(1)
> plt.clf()
> plt.plot(x, y)
> plt.show()
> 
> Now, I want to do a scatter plot, but don't want to generate the data
> again. I just want the "line by line" evaluation like in R and Matlab.
> Basically, you can type in console and add to the existing variables.

If you just want an editor, use an editor, not an IDE. An IDE attempts
to understand the totality of your project so it can give you
suggestions on various things e.g. autocompletion for methods and so
forth - as you describe above - and if that's not what you want, don't
use one.

Sadly, vim, which is The Best Editor Ever (see 23 million flamewars for
why such statement can only be a feeble attempt at humor, not reality),
is now trying to behave like an IDE, and it's doing things badly wrong.
For example, if I type import in a "from" line, it helpfully inserts the
word import... meaning those end up with syntax errors, "from foo import
import bar".  I don't know who is responsible for that idiocy and
haven't taken the time to figure out how to shut off the misbehavior.

You're not really talking about an editor with the rest of your
description, though.  You want to type something and have it acted on
right away. The IDEs, and even the almost-IDE programs, can run the
script with a quick key sequence, which is fairly close to what you're
talking about.  Sublime Text and Atom are two that are more editor than
IDE, but still have IDE-like behavior.

All this is just opinions...

Another opinion is Jupyter notebook (formerly iPython notebook) might be
closer to what you're looking for.


More information about the Tutor mailing list