Sam (I presume),

Like you I am also in the process of learning to program in Python. I have been using Python 2.5.2 for quite some time but recently made the switch to 3.0.1. Why? Because I read an article where Guido van Rossum himself recommended that anyone starting out learning Python now was wasting their time if they didn't start with Python 3. Some folks on this list will tell you there is not much difference and that seems to be true but I pleased that I made the switch.

Now for your question about an IDE. I am presuming you are just beginning, perhaps done some programming in another language and probably using a Windows based PC. Given that there are some things I would recommend you stay away from (this will get the juices going :-) ): Vi, Vim, Emacs and all those old fashioned UNIX/Linux based editors - they are just too hard and why bother anyway, there are much more civilised ways of proving your manhood. Eclipse is also an over-kill. I would recommend any of the popular text editors; most will recognise Python files.

I can tell you what I use:
*EditPad+* - http://www.editplus.com/index.html - A great general purpose text editor that has the additional benefit of clip libraries (what?). This might not seem important but it is a great time saver. A clip library is a text file of code snippets that when you 'double-click' the required clip the editor inserts that code at the current cursor position. For example the following is a clip I use for the heading of a short script file:

#T=Short script
^# ^!.py
^# The purpose of this script is

def main():
{code here}

main()

After the clip has been inserted the cursor is positioned where the "^!" string is (before ".py") waiting for the script name to be inserted. You just build these clips to suit yourself. TextPad is another text editor with the same features.

The main drawback with EditPlus is that when you run a Python script from within EditPlus and that script uses stdin (eg. an input() function) the editor can't handle it and you get an error message. I overcome this problem by using easygui (http://easygui.sourceforge.net/) dialogs for text input; a piece of cake :-) . Another drawback is that EditPlus is shareware and you have to pay for it (US35).

*SciTE* - http://www.scintilla.org/SciTE.html - Scite is a very good little editor, it does not have the "bells and whistles" that editors like EditPlus have but it does recognise Python files and can run them from within the editor. It can also handle stdin (not that elegantly, but it works) so you don't need the easygui work-around and its free.

*IDLE* - the built-in Python IDE. I have it configured so that the editor panel loads first rather than the Python prompt. Everything runs in IDLE!

*PyScripter* - http://code.google.com/p/pyscripter/ - From the web site: "PyScripter is a free and open-source Python Integrated Development Environment (IDE) created with the ambition to become competitive in functionality with commercial Windows-based IDEs available for other languages." This is a true IDE with most of the things you would expect. However, I find that it gets a bit buggy at times. It does support Python 3 and is free so its worth a try.

There are several other good Python editor/IDE's but they require wxPython and it has not yet been made available in a Python 3 compatible version.

I hope that helps. Give me a reply if you want any more help with any of these things. Easygui is something that is really worth getting to know. A copy of Python (Second Edition) by Toby Donaldson (ISBN 13: 978-0-321-58544-8) is another good thing to have when you are learning.

Regards,
Peter
--
*Peter Anderson*
There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take the lead in the introduction of a new order of things—Niccolo Machiavelli, /The Prince/, ch. 6
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to