editing scripts on a mac

Michael Bentley michael at jedimindworks.com
Fri Apr 27 15:17:34 EDT 2007


On Apr 27, 2007, at 11:08 AM, Steve Holden wrote:

> I am teaching someone Python by email, and part of our conversation
> recently ran as follows:
>
> him> How do I save a script and run it?
>
> me > Do you have a text editor? If so, edit the script in that, then
> save it
> me > in your home directory (the place you can see when you open the
> terminal
>
> him> I do not have a text editor, but here are the answers to
> him> questions 1-5.
>
> Now, frankly, I don't think this answer is correct, since I know OS  
> X is
> a UNIX derivative, but I am loathe to involve a programming noob  
> with vi
> or something similar. So I wondered if one of the c.l.py mac users  
> could
> give brief instructions for firing up a visual text editor of some  
> sort
> and saving a file somewhere it can easily be accessed from a terminal
> window (which I presume starts up in his home directory).

As Thomas mentioned, Text Edit is in the Applications folder.  And as  
Tommy mentioned, OS X does come with emacs.  The default emacs on OS  
X is terminal based (and I've never figured out what key is supposed  
to be the Meta key).  Other terminal based text editors include vi  
(of course) and nano.

The IMHO better emacs Tommy suggested: Aquamacs is *really* good, and  
unlike the non-emacs editors mentioned so far -- has syntax  
highlighting for Python (and most everything else).  But both Text  
Edit and nano are dead easy for noobs.

BTW, the Terminal application is in Applications->Utilities

hth,
Michael




More information about the Python-list mailing list