To IDE or Not? A beginner developer's dilemma [closed] - python

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera.
I just want to know if I should use an IDE or not.
I've heard only good things about Anjuta, but not convinced of its Python support; care to comment?
And also is there any other good IDE I should check out?
Currently I am just planning on coding as usual in vim.

The ability to debug using an IDE makes your life so much easier.

Python is a particularly strange language in that having a full-fledged IDE doesn't really add much (and some would argue that an IDE tends to severely limit your thinking-flow in Python). I've been using regular Vim and Gedit to develop in Python and never really missed using IDE.
Text editors like Vim or Emacs itself can be configured quite flexibly to match an IDE power though, so it doesn't really matter which way you go.

There are numerous IDEs you can check out. Take a look at PyDev, PIDA, Komodo, Eric.
I personally don't think IDEs add that much to software development (on this scale and in this language). Python has fine external debugging tools and refactoring is not that hard with a program of this size.
Do you currently use or want to use any features you miss in your current editor? If so, pick another one, else, stick with what you like most.
As long as it has version control integration you should be fine.

Personally I do most my Python coding in Vim, but once in a while I feel like using a full-IDE and I use Eclipse with Pydev at those times.
It depends on your own preference, some people absolutely love Vim and won't use anything else. Others just can't work without an IDE.
Here's a list of:
Python IDEs: http://wiki.python.org/moin/IntegratedDevelopmentEnvironments
Python editors: http://wiki.python.org/moin/PythonEditors

In terms of using an IDE or not, it doesn't matter. I prefer using an IDE since I like having the tools I need bundled up into one nice, neat little package that can handle all of my development. However, using a text editor is just as good, especially ones as powerful and extensible as vi(m) and (x)emacs. The real reasons for using an IDE, though, are code completion, management of indentation, code folding, refactoring support, and debugging.
If you want to check out other IDEs for Python development, I would suggest also looking at NetBeans and Eclipse with the appropriate plugins. I, personally, prefer NetBeans since I have a feeling that PyDev is going to be going downhill since Aptana bought them (previously, they ruined RadRails, which is the Eclipse plugin for Ruby on Rails development) and don't want to get comfortable with a tool that might not be useful long-term.

With Java, I'd say no IDE for beginners, because you have to understand CLASSPATH first.
With Python, I'd say PyCharm from JetBrains. IntelliJ is the best Java IDE; PyCharm is making my Python work a pleasure.

IMHO, not using IDE to develop is just like using typewriter to write a novel. Nobody said you can't, but why you have to try that hard when you already have laptop?

I code in Vim for python. If you want to use an IDE then I would recommend IntelliJ's PyCharm. I use vim because the actual editing is far superior and if you are a power user there is very little that you can't do easily.
PyCharm provides help with api by providing completion and helps with some basic refactoring. These advantages though wear of sooner than you would expect. I use grep and vim regex to do refactoring - its a bit more work than pycharm but if you can manage it then the advantages of vim clearly outweigh using an ide.
I assume that you are developing in a *nix environment, if you use windows then I would recommend using an Ide.

As opposed to some other guys here, I think that an IDE does add much to software development, even for a dynamically typed language like Python which makes it harder to do static analysis.
My preferred IDE for Python development is Eclipse with PyDev. Before that, I coded in Notepad++ which isn't much different than the PyDev editor in terms of features. PyDev has some great features that you won't find in a "normal" editor:
It shows warnings and syntax errors (almost) in realtime. A text editor won't tell me about typos, but PyDev does. As another example, unresolved imports or undefined functions (e.g. because of a typo) are marked as warnings/errors. And there are many more common mistakes that are automatically detected, and PyDev can be integrated with pylint so that warnings and errors from pylint are displayed with the usual icons in the editor.
Autocompletion by introspection
Outline view of the current module and its classes
Additionally, Eclipse itself is also great for any kind of programming project. I especially like the fully integrated interface - project explorer, editor, outline, console, problems overview, run configurations and so on. When using Vim, Emacs or similar, I guess you would have to install lots of plugins or custom scripts to achieve the same.
As you said you want to do a project, I think that Eclipse is a good choice. For quickly hacking a small Python script, it's overkill of course.

If you just start learning python/glade/gtk stack, I'd say you should start without an IDE just to learn how it works internally. This will help you later when your code will be bigger and more complex.
However, good IDE helps in so many ways I wouldn't recommend against using any in the long run. This article might help you decide whether you need any: http://infoworld.com/d/developer-world/infoworld-review-nine-fine-python-development-tools-374

it's horses for courses, personally i'm much happier with textmate or vim and a nice cup of coffee but it's what feels more comfortable to you.
there's no shame in using an IDE, if it's what gets your idea out there to the masses the most productive then use whatever you like.
however when starting out i'd favour something with intellisense as it'll teach you the basics as you type, give it a year and you'll be a master at it.

Two ways to approach this:
Use what you're used to. If you have used an editor in the past and know its quirks, stick with it. You'll waste less time figuring out how to work with the tool and spend more time on the actual project.
Use something new. Anjuta, vim, whatever, as long as you haven't spent too much time with it so far. You'll learn a whole lot of stuff besides your actual project, but the project itself won't be done as fast as could be.
Personally, I prefer 2. Always learn something new, as long as it's not crunch time and it-has-to-be-done-by-friday. An IDE can help you only so much, but when you're still in the learning phase the more time you spend on the code yourself, the better.

I'm not a Python programmer, but I prefer not to use IDEs.
The reason for this is that I find IDEs are often big and do too many things for me, whereas using Notepad++ and the command prompt allows me to trim things down to suit my needs rather than being surrounded by features that I don't use. This allows me to learn more easily, because I have more control over what happens.

Don't learn coding with an IDE. Code with it!

I find using an IDE to dramatically help my Python code productivity. In particular, using wingide makes coding in python a pleasure. It has all the normal things you would expect (syntax highlighting, auto-complete, etc) but the killer features are the debugger and the debug probe.
These two features are worth the cost of the program. It lets you see the live state of the application and try out python statements live at breakpoints. I find this especially helpful to explore the current state and to try out some code to see if it will work. I often write some of the trickier sections of code in the debug probe live and them copy them into my application. Very nice.

Related

Looking for a Python editor that will let me collapse functions

I really loved this feature when I used Eclipse for Java programming, but I can't find the same functionality for a Python editor. IDLE and Pyscripter are nice, but they don't help in this area.
Basically, I just want the option to collapse or otherwise hide functions that I don't feel like looking at for a while. Know of anything like this?
In addition to the aforementioned (great) editors, you might want to give PyDev a shot as well.
Geany can do this.
Notepad++ has this feature.
Komodo Edit IDE, for Windows, Mac and Linux, for Python, PHP, Ruby, JavaScript, Perl and Web Dev.
I've used Komodo Edit and Notepad++ in the past but my current preference is Sublime Text Edit 2.
Although not free (and actually quite expensive), it can be used in free mode with only an occasional reminder and no other restrictions.
It is actually written in Python so you get a Python console built in - you can also get other consoles such as JavaScript. It is VERY flexible & has some very good features. It is also has an excellent community with loads of very useful plugins.
It is much lighter on resource usage than Komodo, can use Textmate bundles directly (so gets loads of formatting options for different file types). It is cross-platform and doesn't even need installation on Windows.
Pycharm CE, from Jet Brains, indeed, wonderful. Functions and comments collapse is ready out of the box, as well as edit helpers. Project files and assets organization, integrated python console, powerful debugging tools,... Then, lots of plugins: git integration, tinycode view, extra languages' helpers and highlighters,.... anything you need when coding, but simple and easy to use. There's a Pro (paid) version for those who want even more.
https://www.jetbrains.com/pycharm/download
(This question is more than 10 years old. I got surprised, nobody answered about Pycharm before...)

Autocompletion in dynamic language IDEs, specifically Python in PyDev

I'm new to Python, with a background in statically typed languages including lots and lots of Java.
I decided on PyDev in eclipse as an IDE after checking features/popularity etc.
I was stunned that auto-complete doesn't seem to work properly for builtins. For example if I try automcomplete on datafile after:
datafile = open(directory+"/"+account, 'r')
datafile.
No useful methods are suggested (e.g. realines). Only things like call.
I am used to learning a language by jumping into class definitions and using lots of auto-complete to quickly view what a class will do. My PyDev 'interpreter' is set up fine with 'forced builtins'.
Is it possible to get auto-complete for builtins with PyDev? Am I approaching the IDE wrong, i.e. should have an interpreter running on the side and test stuff with it? So far the IDEs have seemed weak, e.g. IDLE segfaulted on my new mac after 2 minutes. I'd love to know what experienced Python developers do when exploring unfamiliar (builtin) modules, as this is making me reconsider my initial attraction to Python. I like a language you can learn by easy exploration!
Thanks,
In my opinion, the Python shell is a much better place to explore new modules than relying on an IDE. Don't forget, in Python you can do anything in the shell that you can do in a program, because there's no separate compilation step. And in the shell, you can use dir(x) to find all the properties and methods of x, whether x is a module, a class, or whatever.
Even better, the enhanced iPython shell does provide tab completion for all objects.
In fact because of this, many Python programmers - myself included - don't use an IDE at all, but just a simple text editor (I use VIM).
Just to keep it up to date so that new readers are not confused about the current state of Pydev - the example you gave now works in Pydev. (btw, one should avoid operating on paths manualy - use os.path.join instead)
I'd love to know what experienced
Python developers do when exploring
unfamiliar (builtin) modules
I use ipython. Ipython is an enhanced version of the interactive shell that adds tab completion and quick access to an object's doctstring. It also gives lots of other features that the standard shell does not have - you can find a summary of its features here.
Someone more knowledgeable here can give you a detailed answer. Here is a short one.
Autocomplete for a dynamically typed language can by nature never be as rich as that for a statically typed language. In the case of open for instance there is no way to figure out what will be the return type at the time of writing the code. The method signature does not include a return type unlike a statically typed language like Java. Consequently the IDE is not able to give you any hints.
You certainly should have an REPL running during any Python development. One advantage of an interpreted language is that you can test small chunks of your code on the REPL as you go along. It is also a good place to test your understanding of how built-ins and other modules work.
I work on Ubuntu so I do not know how easy or difficult it is to get IDLE running on a Mac. I usually work with the very handy iPython for REPL needs and use Pydev for other development (such as Django). You might want to give iPython a try.
You want IPython. As Daniel pointed out above, the interactive shell is a much better way to explore Python (and indeed, most other languages too).
This might help with setting it up on OSX.
You might want to take a look at WingIDE. It autocompletes your datafile correctly.
If it is unable to infer the type, you can use an assert like
assert isinstance(datafile, file)
to help the autocompleter out
I use PyDev at work so I know where you're coming from. If you're willing to consider other tools, have a look at JetBrains' PyCharm, that's my new preferred Python IDE for my own projects. No affiliation to speak of except to say I'll be picking it up when it's out of beta. :)

All in one Django/Python editor

I know this is probably a question that is asked a ton on here but I haven't been able to find exactly what I'm looking for. I'm a JAVA developer that is learning Python and Django and I'm looking for a good development environment. I would like to be able to edit python code, css, html and javascript all in the same editor if possible. I have been trying out both Komodo and pydev. I like Komodo so far. Being a JAVA developer I am very comfortable in Eclipse but it just doesn't feel like it might be the right environment to be doing Python development in. I was wondering if anyone had good recommendations. I also have heard about CODA, TextMate and SubEthaEdit. I should mention that I'm doing my development work on Mac. I know these things are really opinionated but didn't know if there was some kind of "industry" standard for Python/Django development on the Mac.
I have done the normal searches on stackoverflow and looked through this post as well What IDE to use for Python?. I just haven't found an answer that seemed to fit my situation......
If your familiar with eclipse, by all means try Pydev first. I was the opposite, I was/am a Python developer who switched to Java. There was no real difference between using Eclipse for Java and Eclipse for Python (Pydev), you still get inline docs, debugging, code completion, the whole bit. You also get a lot of great stuff along with it like subversive, mylyn, aptana, etc.
As you're familiar with Eclipse, Pydev is a good choice.
Komodo is the only IDE/Editor I know which supports Django Template Language syntax highlighting. But it's really so rudimentary that I think you can live without it.
A lot of Mac developers use TextMate because it has a lot of creature features.
If you're working with big files and need speed, look at BBEdit - it's amazing how fast it can find/replace stuff.
If you want an editor that is close to Eclipse, but not a full-blown Java-based/oriented IDE, Komodo Edit (open source) or IDE (commercial) is pretty good, though I can usually get it to crash within an hour. I think it doesn't like me.
My primary editor is vim or gvim, depending on what hosting system I am on. It handles every language, runs on Mac, Linux and Windows, and is very customizable and, when you're used to it, can be very fast. I spend 99% of my editing time in gvim and it's the first or second thing I install on a machine, along with my customized setup and favorite fonts and plugins.
I'm on OSX and I've recently tried out http://www.jetbrains.com/pycharm/ and it looks pretty good, but I can't quite get comfy with it -- but if you're familiar with Eclipse, then you might like it.
Personally, I find that I'm plenty productive with TextMate and a few of the Textmate Python/Django bundles
I think you should give Geany a try. Its very easy to use and is definitely one of my most favorite IDE's I have ever used.

What is the importance of an IDE when programming in Python?

I'm a beginning Python programmer, just getting my feet wet in the language and its tools and native practices. In the past, I've used languages that were tightly integrated into IDEs, and indeed I had never before considered that it was even possible to program outside of such a tool.
However, much of the documentation and tutorials for Python eschew any sort of IDE, relying instead on powerful editors and interactive interpreters for writing and teaching the language.
How important is an IDE to normal Python development?
Are there good IDEs available for the language?
If you do use an IDE for Python, how do you use it effectively?
IDEs arent very useful in Python; powerful editors such as Emacs and Vim seem very popular among Python programmers.
This may confuse e.g. Java programmers, because in Java each file generally requires boilerplate code, such as a package statement, getters and setters.
Python is much more lightweight in comparison.
If you're looking for an equivalent to Visual Studio or Eclipse, there is... Eclipse, with Pydev.
Emacs and Vim are very powerful and general, but have a steep learning curve.
If you want to use Emacs, I highly recommend python mode; it's much better than the default Python mode.
A matter of habit and personal preferences. Me, I use vim (I have to admit emacs is at least as powerful, but my fingers are deeply trained by over 30 years of vi, and any other editor gives me the jitters, especially when it tries to imitate vi and never really manages to get it 100% right;-), occasionally an interactive environment (python itself, sometimes ipython), and on even rarer occasions a debugger (pdb). A good editor gives me all I need in term of word completion, lookup, &c.
I've tried Eclipse, its plugins, eric, and Kommodo, but I just don't like them -- Wing, I think I could get used to, and I have to admit its debugger is absolutely out of this world... but, I very rarely use (or need!) advanced debugging functionality, so after every rare occasion I'd forget, and have to learn it all over again a few months later when the need arose again... nah!-)
How important is an IDE to normal Python development?
Not very, IMHO. It's a lightweight language with much less boilerplate and simpler idioms than in some other languages, so there's less need for an IDE for that part.
The standard interactive interpreter provides help and introspection functionality and a reasonable debugger (pdb). When I want a graphical look at my class hierarchies, I use epydoc to generate it.
The only IDE-like functionality I sometimes wish I had is something that would help automate refactoring.
Are there good IDEs available for the language?
So I hear. Some of my coworkers use Wing.
If you do use an IDE for Python, how do you use it effectively?
N/A. I tried using Wing a few times but found that it interfered with my normal development process rather than supporting it.
The IDE you use is a personal and subjective thing, but it definitely matters. Personally, for writing short scripts or working with python interactively, I use PyDee available at http://pydee.googlecode.com/ . It is well done, fairly lightweight, but with good introspection capabilities.
For larger projects involving multiple components, I prefer Eclipse with appropriate plugins. It has very sophisticated management and introspection capabilities. You can download it separately or get it as part of Python (X,Y) at http://www.pythonxy.com/ .
In contrast to the other answers i think that IDE's are very important especially for script languages. Almost all code is bad documentated and an IDE with a good debugger gives you much insides about what is really going on what datatypes are assigned to this values. Is this a hash of lists of hashes or a list of hashs of hashs.
And the easy documentation lookup will save you time.
But this is only important for people who need to count there time, this normally excludes beginners or hobbyists.
(1) IDEs are less important than for other languages, but if you find one that is useful, it still makes things easier. Without IDEs -- what are doing? Always running Python from command line?
(2-3) On my Mac there's included IDLE which I keep always open for its Python shell (it's colored unlike the one in Terminal) and I use free Komodo Edit which I consider to be well-suited for Python as it doesn't go into the language deeply but rather focuses on coloring, tab management, parsing Python output, running frequent commands etc.

Has anyone tried NetBeans 6.5 Python IDE?

Has anyone tried the NetBeans 6.5 Python IDE?
What are your opinions? Is it better/worse than PyDev? Do you like it? How does it integrate with source control tools (especially Mercurial)?
I will share some of the feelings from using it for quite a while now. Things that are roughly the same quality as in Eclipse+Pydev+mercurial:
editor, code-completion
debugger features
Things that are better:
autoimport
color schemes (Norway today rocks)
Mercurial support (though it is getting better and better in Eclipse)
Things that are worse:
zipped egg packages are not recognized for either code completion or the autoimport
libdyn packages (e.g. datetime) are not recognized
debugger is having trouble with multiprocessing package
you cannot choose file from outside of the project (/usr/bin/paster) to be the main file (this is what I use to debug Pylons applications)
Does anyone have something to add to the list?
BraveSirFoobar, it would be nice to know more about what problems you found -- the very, very slow part, as well as the crash. The first time you run the IDE it will index information about your Python platform and project and libraries - such that it can do quick code completion, go to declaration etc. later - but once that's done it's not supposed to be slow - but there might be bugs.
Mercurial should definitely be supported well, since the NetBeans project itself (and Solaris and Java) are all hosted in Mercurial repositories.
We plan to have really deep support for Python, much in the style of our Ruby support. One of the things which really helped in our Ruby work was the feedback from our early adopters, so if you try Python and have issues with it, please let us know so we can fix it. (Feedback links here: http://wiki.netbeans.org/Python )
-- Tor
Compared to pydev, I found it very, very slow, and it crashed (once) when I created a project from existing sources. It's still beta, though.
Integration with SCMs will be as good as netbeans is already (I only tried subversion, which worked fine).
Feature-wise it was about the same : refactor, debugging, code assist... I'll stick with pydev for the moment, which is IMHO a great tool.
Sun use Mercurial internally now, so expect that their IDE support for it will be top notch.
Having worked with PyDev and PyDev extension for Eclipse for the past few months, the move to NetBeans has been a very pleasurable one.
Without having to hunt all the different plug-ins for PyDev and Eclipse, NetBeans had everything I needed out of the box:
auto completion, super fast index search, style control import control, you name it.
And it seemed LESS bug prone than Eclipse (which is pretty stable).
Also, the built-in Vim like auto code snippets it uses are just fantastic.
IMO, it beats Eclipse hands down.
I'm hooked.
I started using it a little while back and I like it. I usually develop in a simple editor (SciTE), NetBeans is nice to organize larger projects.
wrote about it briefly here
How does it compare with PyDev Extensions? I've recently installed it and, to be honest, couldn't imagine myself going back to PyDev.
NetBeans seems interesting though, if only I wasn't already hooked onto a couple of other Eclipse plug-ins as well.
After looking at this, I decided to go ahead with PyDev than NetBeans.
However best wishes to NetBeans team for a faster and better Python support. Cant wait for that :)

Categories