The Artima Developer Community
Sponsored Link

Weblogs Forum
Python IDEs

68 replies on 5 pages. Most recent reply: Mar 9, 2006 12:32 PM by Bruce Eckel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 68 replies on 5 pages [ « | 1 2 3 4 5 | » ]
Joe Goldthwaite

Posts: 6
Nickname: jgold
Registered: Jan, 2006

Re: Python IDEs Posted: Feb 16, 2006 9:24 AM
Reply to this message Reply
Advertisement
I spent years developing on the Pick operating system using a very rudimentary editor and debugger. Once you learn the tools they become invisable. You can just focus on programming. For productivity, really learning a tool is more important than the tool's actual features.

That said, I have to disagree with people who don't think an IDE is useful. There's a longer learning curve to make the program invisable but Auto completion alone is worth the price of admission. The integrated debugger is also very useful. Having syntax highlighting, etc is icing on the cake.

Just using and editor might put hair on you chest but I'm old enough to have a problem with hair growing on my ears! I don't need any more on my chest.

When I started programming Python, I initially went with ActiveState's plug in for Visual Studio. The auto completion was kind of hit or miss but the debugger was very good. Using Visual Studio simplified things since I was coming from VB at the time.

When I decided to try my hand developing for Linux, I shopped around for a multi-platform IDE and settled on Wing. It has some strange features (search and replace) that work very well when you get used to them but still feel awkward to my fingers since they don't follow the Windows standard. The debugger feels sluggish compared to Visual Studio but it works well and I'm hoping my next notebook will be fast enough to eliminate that problem.

I wish Python would add some optional type declarations to the language to make the job of auto completion easier. I know some people strongly disagree with this but it's one of the things I miss the most. Wing tries to do it but with a dynamic language it's very difficult. I wouldn't mind adding a few type-like statements to the doc string to help the IDE out a bit.

You have to understand the bigger problem. I'm in a Windows shop. I'm trying to convert a bunch of Windows programmers from VB and .net. I hate Microsoft but their tools have a lot of polish and they work really well. Trying to get the programmers to give up the features they're used to just makes the job of converting them that much harder.

nes

Posts: 137
Nickname: nn
Registered: Jul, 2004

Re: Python IDEs Posted: Feb 16, 2006 10:46 AM
Reply to this message Reply
This discussion is like the arguments for GUIs and CLIs. In Java you use IDEs (GUI). In Python you use the interactive shell (CLI) (e.g. dir()) to do many of the same things.

Tero Saarni

Posts: 4
Nickname: tsaarni
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 16, 2006 11:12 AM
Reply to this message Reply
There's very interesting essay about state of the art IDEs from Charles Petzold with "Programming Windows" fame. I guess most of you are familiar with it already (it appeared on slashdot) but in case you're not, here's a link: http://www.charlespetzold.com/etc/DoesVisualStudioRotTheMind.html

Andreas Mross

Posts: 12
Nickname: amross
Registered: Apr, 2004

Re: Python IDEs Posted: Feb 16, 2006 6:58 PM
Reply to this message Reply
Another great thing about autocompletion is that you are no longer encouraged to use short, abbreviated names for variables and methods and can instead use nice, long, readable descriptive names. We all remember programming in C where we used short variable names like fp ("FilePointer"), or docNbr ("DocumentNumber") to save those precious key strokes. Now if we are using an IDE we don't have to resort to such compromises. We can type the first couple of letters of the variable, hit ctrl-space and there it is!

I wouldn't hancy having to finger type a method name like "replaceCreditTransferWithEmployeeResult"; especially if I had no compiler to check that I'd got the spelling right. I have no experience with Python codebases, but I would imagine these kind of descriptive method and variable names are avoided, for fear of too much finger typing slowing down development speed.

Probably the main reason IDEs are not used in dynamic languages is that the features they provide and that make them so useful are just not possible in dynamic languages. Things like "find usages", "go to declaration" and even refactoring are not practical because the information required to perform these operations in a robust fashion is not available till runtime.

j c

Posts: 1
Nickname: jstncbllr
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 16, 2006 10:13 PM
Reply to this message Reply
There's really nothing better than an editor that truly *understands* your code and its language as more than just a flat string of characters.

Such a tool opens up a world of higher-level editing capabilities, and you pretty much stop pushing characters around and start using the language on a more conceptual (and therefore much faster) level. It's like having a conversation w/ someone versus exchanging messages in morse code.

Personally, after having used Intellij's editor for the last 3-4 years, I find I don't often have to drop down into "text mode" mentally. It's quite liberating. Of course a well designed UI is also key in gettng you there.

I'd imagine (but what do I know really) that such tools would be more difficult to create for a dynamic language. But I have no doubt of their potential utility. I'm hesitant to use any language seriously until it has such editing support.

Anthony Tarlano

Posts: 9
Nickname: tarlano
Registered: Jun, 2003

Re: Python IDEs Posted: Feb 17, 2006 1:27 AM
Reply to this message Reply
I recommend:

(X)emacs with the bicyclerepairman package..

Anthony

Christian Muirhead

Posts: 3
Nickname: xtian999
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 17, 2006 2:19 AM
Reply to this message Reply
The new AST that will be a part of Python 2.5 should help - it will be much easier to make environments that understand the structure of the code. Until now, the Python compiler wasn't provided in a way that made it usable by external tools, so I think things like IDEs and Bicycle Repair Man have to parse the code themselves (in a more-or-less ad-hoc manner).

Kay Schluehr

Posts: 302
Nickname: schluehk
Registered: Jan, 2005

Re: Python IDEs Posted: Feb 17, 2006 3:04 AM
Reply to this message Reply
> The new AST that will be a part of Python 2.5 should help
> - it will be much easier to make environments that
> understand the structure of the code. Until now, the
> Python compiler wasn't provided in a way that made it
> usable by external tools, so I think things like IDEs and
> Bicycle Repair Man have to parse the code themselves (in a
> more-or-less ad-hoc manner).

Strange enough but I did parse-tree transformations in Python plenty of times. Those parse-trees are NOT ASTs, but reflect the structure of the grammar directly. There is currently an AST module in the compiler package but you can't compile to bytecode from those AST representations. So they are not very usefull. Will Python 2.5 enable to do this? Transformations on parse-tree level have advantages too allthough they are more complicated to handle: if you define a new grammar G* extending Pythons grammar and use a Python parser to parse along this grammar you receive a parse-tree of a language Python*. If you transform those Python* parse-trees to those of Python you can compile a different language into CPython bytecode.

Kay

Paul Boddie

Posts: 26
Nickname: pboddie
Registered: Jan, 2006

Re: Python IDEs Posted: Feb 17, 2006 4:47 AM
Reply to this message Reply
Kay Schluehr quoting Christian Muirhead:
> > The new AST that will be a part of Python 2.5 should
> > help - it will be much easier to make environments that
> > understand the structure of the code. Until now, the
> > Python compiler wasn't provided in a way that made it
> > usable by external tools, so I think things like IDEs
> > and Bicycle Repair Man have to parse the code
> > themselves (in a more-or-less ad-hoc manner).

Yes, but there's the compiler package - see below.

> Strange enough but I did parse-tree transformations in
> Python plenty of times. Those parse-trees are NOT ASTs,
> but reflect the structure of the grammar directly. There
> is currently an AST module in the compiler package but
> you can't compile to bytecode from those AST
> representations.

Well, I've managed to take the compiler.ast nodes and compile them to bytecode using other functions in the compiler package, so perhaps this is something you missed because it's certainly possible.

> So they are not very usefull. Will Python 2.5 enable to
> do this?

I've been struggling to see what the sensation is about the "new AST" in Python 2.5: is it that the actual runtime's parser is accessible in at least as high-level a way as the objects produced by the compiler package? That doesn't seem so sensational to me - for AST experimentation I don't care who produces the AST.

On the subject of source code analysis, check out my analysis package (http://www.python.org/pypi/analysis) for some rudimentary experiments, hopefully to be updated in the near future with some better algorithms and techniques. (Check out pylint and PyChecker, too!)

Stephen Ferg

Posts: 1
Nickname: srferg
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 17, 2006 6:31 AM
Reply to this message Reply
I use Komodo and find it very helpful. One of its biggest benefits, for me, is that it points out syntax errors (and so warns you of typos) immediately: for example, if you have nested parenthesized expressions and you forget to close a parentheses, or your indentation is off, Komodo will highlight the line where the problem occurs. If you mouseover the highlighted line, a little "tip" window opens up and describes the nature of the problem. Very handy! It also allows me to work on Windows and edit "remote" files that reside on a Unix server, something that is a real timesaver in my particular environment.

Kay Schluehr

Posts: 302
Nickname: schluehk
Registered: Jan, 2005

Re: Python IDEs Posted: Feb 17, 2006 6:43 AM
Reply to this message Reply
> Kay Schluehr quoting Christian Muirhead:
> > > The new AST that will be a part of Python 2.5 should
> > > help - it will be much easier to make environments
> that
> > > understand the structure of the code. Until now, the
> > > Python compiler wasn't provided in a way that made it
> > > usable by external tools, so I think things like IDEs
> > > and Bicycle Repair Man have to parse the code
> > > themselves (in a more-or-less ad-hoc manner).
>
> Yes, but there's the compiler package - see below.
>
> > Strange enough but I did parse-tree transformations in
> > Python plenty of times. Those parse-trees are NOT ASTs,
> > but reflect the structure of the grammar directly.
> There
> > is currently an AST module in the compiler package but
> > you can't compile to bytecode from those AST
> > representations.
>
> Well, I've managed to take the compiler.ast nodes and
> compile them to bytecode using other functions in the
> compiler package, so perhaps this is something you missed
> because it's certainly possible.

Indeed? What can I do with following expression:

>>> import compiler
>>> expr = compiler.parse("1+2")
>>> expr
Module(None, Stmt([Discard(Add((Const(1), Const(2))))]))

Which library function accepts a compiler.ast.Module object and generates bytecodes from it?

The compile function in pycodegen.py accepts source only.

>
> > So they are not very usefull. Will Python 2.5 enable to
> > do this?
>
> I've been struggling to see what the sensation is about
> the "new AST" in Python 2.5: is it that the actual
> runtime's parser is accessible in at least as high-level a
> way as the objects produced by the compiler package?
> That doesn't seem so sensational to me - for AST
> experimentation I don't care who produces the AST.
>
> On the subject of source code analysis, check out my
> analysis package (http://www.python.org/pypi/analysis) for
> some rudimentary experiments, hopefully to be updated in
> the near future with some better algorithms and
> techniques. (Check out pylint and PyChecker, too!)

The PyChecker code is pretty opaque but I checked out the bytecode inspector version only.

Kay

Jonathan Ellis

Posts: 7
Nickname: jbellis
Registered: Aug, 2005

Re: Python IDEs Posted: Feb 17, 2006 7:48 AM
Reply to this message Reply
I posted a python IDE review a couple months ago: http://spyced.blogspot.com/2005/09/review-of-6-python-ides.html

(I'm updating this with the SPE ide for a pycon talk next week.)

Summary: yes, there are very good IDEs available for Python.

Scott Szretter

Posts: 1
Nickname: sszretter
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 17, 2006 9:17 AM
Reply to this message Reply
I am a newbie to Python, but what about "Boa", http://boa-constructor.sourceforge.net/ ??

S Deibel

Posts: 9
Nickname: sdeibel
Registered: Apr, 2003

Re: Python IDEs Posted: Feb 17, 2006 9:57 AM
Reply to this message Reply
I co-founded Wingware, makers of Wing IDE, so clearly I think an IDE is a valuable thing for Python! My current favorite comment from a user, appropriately illustrative here, is "I got along w/o a Python IDE for a long time...but now I'm wondering why. Writing Python without Wing is like driving a Ferrari with the parking brake on." Believe me, we couldn't make this stuff up if we tried! ;-)

Auto-completion, goto-definition, error indicators on the editor, seeing documentation and call tips while typing code -- these features all speed up development time because they cut down on amount of typing, frequency of typos, and the number of times you have to switch over to documentation.

A good debugger makes a huge difference as well.

We try pretty hard to make the transition easy, with emacs (and soon vi) bindings, and configurability of the features. Even so, I'd still have to guess that the majority of our customers are new to Python, or at least new to using it on a serious commercial project. People coming from Java or MS languages to do commercial development in Python (and there are droves of them these days) pretty much require there to be an IDE. I've never seen them to decide that they don't need an IDE because Python is so easy and when we do win over long-time Python users it does seem to show that IDEs are also valuable for Python.

But "don't take my word for it" yada yada yada. We offer free trials. See wingware.com.

Laura Creighton

Posts: 1
Nickname: lac
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 17, 2006 10:00 AM
Reply to this message Reply
My name is Laura Creighton and I am a founder of AB Strakt,
a company you are unlikely to have heard of, unless you live
in Sweden.

Our company develops our entire range of products in
python. As you might expect, many of our engineers come
from a Java background and expect an IDE. About 4
years ago, we evaluated all the IDEs on the market, free
and non-free and determinined that WING-IDE

http://wingware.com/

was overwhelmingly the superior product. It cost money, but we were happy to pay. Since this time,
open source platforms have improved, and we believe
that wind ide is now only 'by far' the superior product,
as opposed to 'overwhelmingly'. But still by far the
best should you want an IDE.

I have no connections to wing-ide aside from being a
most happy customer, but I believe that there are likely
to be many of you who read this column in search of
reasons to leverage your java experience into python.
Check out the free demo of wing ide and see if you can.


Laura

Flat View: This topic has 68 replies on 5 pages [ « | 1  2  3  4  5 | » ]
Topic: Which Part of  "No XML" Don't You Understand? Previous Topic   Next Topic Topic: The Backside of an Interface

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use