Thread: editor

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    58
    Rep Power
    11

    editor


    what is the best editor for python?

    I have tried one but it didnt work
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    These are my favourites:
    Linux - Kate
    Windows - Textpad and Idle

    Grim
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Location
    Reutlingen, Germany
    Posts
    10
    Rep Power
    0
    I'm using nEdit under Linux and UltraEdit under Win
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    "Best" is a very subjective term, so you are likely to get as many answers as there are readers.

    Are you looking for a general purpose editor that has some python support, or a python specific IDE, with features such as built-in interactive console and name completion?

    Here is a list of editors I have used, with some comments. I would not consider any of them as "best", since they all have strengths and weaknesses.

    General purpose editors:
    • Vim - classic UNIX editor, but also available for Windows. Steep learning curve, but very powerful. Has python syntax colouring and indentation support.
    • emacs or xemacs - the other classic UNIX editor, also available for Windows. Equally steep learning curve to Vim, and equally powerful. Similar Python support to Vim. There are countless religious wars between the two groups of users, but if you take the time to learn either one well then it will be time well spent.
    • Eclipse - highly regarded Java IDE, mainly aimed at Java developers but there is a Python plug-in. I have not used this so can't say how it compares to the others.
    • Jedit - general purpose editor written in Java. Good Python support, and there is a Jython plugin so the editor can be scripted in Jython. Memory hungry, so needs a powerful computer to use well.


    Python-specific editors:

    • Idle - comes with the standard Python installation. Implemented in Tkinter. Probably the default Python editor for many people.
    • PythonWin - comes with the PyWin32 Windows extensions, so Windows only. I tend to use this by default for quick editing and experimenting with code snippets.
    • Boa Constructor - written in WxPython. Some interesting functionality not seen in other editors, such as integration with the Bicycle Repairman refactoring tool, and auto generation of UML diagrams and pydocs. This is still alpha software, so can be hard to get a working version. This is a full-blown IDE with a wxPython GUI designer.
    • Spe - another editor written in wxPython. It integrates with wxGlade, which I use a lot for GUI design. I used an earlier version that I found a bit clunky, but I think more recent version may have fixed that.


    PythonWin, Boa and Spe can all give you a class/function browser view of your program, showing the class and function definitions. I find that this makes navigation a lot easier. They also have context-sensitive method and parameter completion - e.g. type the name of an object, and get a list of possible methods on that object. Very useful when using new libraries.

    All of the editors I have listed here are free and open source, so download them and find the one you are most comfortable with.

    Dave - The Developers' Coach
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Of course I only scratched the surface in my last post. Here are links for a more comprehensive list of editors and IDEs.

    Dave - The Developers' Coach
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Depending on what Platform I'd probably have to cast my vote for [Windows] CodeGenie, simply because it's a very, very light weight text editor (you can carry it around with all your documents on a floppy disk) and it still has all the features you would expect from some larger applications - and, it's not hard at all to integrate Python so you can test your scripts without even leaving the editor!

    The down side being that it's not free; but thn it's not expensive either.

    Now for the Mac, there is SubEthaEdit which has some nice features though it's not really what I'd be looking for when it comes to developing large apps - all it has is Syntax highlighting. Then theres Xcode, though you need do so some grunt work to get this playing nicly with Python!

    Both of these can be found on the page Dave linked to above,

    Take care,

    Mark.
    programming language development: www.netytan.com Hula

  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    FL
    Posts
    19
    Rep Power
    0
    I tend to use vim for smaller scripts and emacs for large projects. on windows I stick to using wxpython's pyalamode. it opens up a gui python shell like idle with a nice listing of the current namespace on the bottom aswell as a text editor that does code formatting, code completion, syntex coloring/highlighting, and will bring up a small tooltip window with the __doc__ string of methods.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    58
    Rep Power
    11
    i will try out some of those editors thx.
    But is there an editor that has a compiler in it. Like an auto run py2exe. That would save alot of time for me.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by evilbeefcake
    i will try out some of those editors thx.
    But is there an editor that has a compiler in it. Like an auto run py2exe. That would save alot of time for me.
    Most of the editors listed have some way of running an external program, so you could configure them to run py2exe or any other application. Some of the Python IDEs also have a debugger built in, so you can run and debug a script from within the editor.

    Dave - The Developers' Coach

IMN logo majestic logo threadwatch logo seochat tools logo