[Tutor] While learning Py: To IDE or not to IDE?

Alan Gauld alan.gauld at btinternet.com
Mon May 21 09:44:20 CEST 2012


On 21/05/12 01:41, Steven D'Aprano wrote:

> That is insanity! There is only One True EDitor, ed! It is right there
> in the name, it's an EDitor! ed is the true unix editor:
>
> http://www.gnu.org/fun/jokes/ed.msg.html

Having once had no alternative to ed and a 3500 line C program to write, 
I don't get the joke! (but I did get very tight C!) :-(

$ cat > hello.py
print 'hello world'
^D
$ ed -p'->' hello.py
20
->1,$p
print 'hello world'
->i
for n in range(3):
.
->1,$p
for n in range(3):
print 'hello world'
->2s/print/   print/
->1,$p
for n in range(3):
    print 'hello world'
->wq
42
$

Note I made ed more "user friendly" by including a prompt (->)...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list