[OT] Interactive Python programming in ... cat?

Dan Sommers me at privacy.net
Sat Jul 17 07:10:15 EDT 2004


On Fri, 16 Jul 2004 22:26:13 -0400,
Roy Smith <roy at panix.com> wrote:

> In article <mailman.514.1090030853.5135.python-list at python.org>,
>  "Eli Stevens (WG.c)" <listsub at wickedgrey.com> wrote:

>> Jacek Generowicz wrote:
>> >  You really use ed, don't you ? :-)
>> 
>> Real Men(tm) don't use ed, they use cat.
>> 
>> # cat > hello.py
>> prn^D
>> 
>> # cat > hello.py
>> print "Hello, Wolr^D
>> 
>> # cat > hello.py
>> print "Hello, World!"
>> ^D
>> 
>> I've actually done this, but not for files that long.  ;)

> I once knew a guy who linked /dev/tty to /dev/tty.c, then he could do 
> "cc /dev/tty.c" and type in a C program to compile.

For short programs on many common architectures, use this:

    gzip -d >a.out

For longer programs, revert back to this (because the string tables are
too big to commit to wetware):

    cat >a.out

Regards,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
Never play leapfrog with a unicorn.



More information about the Python-list mailing list