Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38468
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Opinion on best practice... |
| Date | 2013-02-08 12:41 -0500 |
| Organization | > Bestiaria Support Staff < |
| References | (3 earlier) <5112eb4a$0$29965$c3e8da3$5496439d@news.astraweb.com> <mailman.1438.1360214905.2939.python-list@python.org> <51134e9f$0$21812$c3e8da3$76491128@news.astraweb.com> <mailman.1441.1360223398.2939.python-list@python.org> <51142f5e$0$6512$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1517.1360345278.2939.python-list@python.org> (permalink) |
On Fri, 08 Feb 2013 09:49:02 +1100, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> declaimed the following in
gmane.comp.python.general:
>
> Well, Dennis claims that he *does* do it, and that it is one of the better
> features of REXX. And in the code snippet you published earlier, I saw
> plenty of code intended for the shell, but no CALL statement in sight.
>
I've not used it in years, but yes... Since on the Amiga many
applications opened a "rexxport" they were candidates for "current
command processor". REXX implementations on Windows and Linux aren't as
flexible -- for the most part the only viable command processor is
spawning a shell to handle one statement (a la Python's os.system() ).
On the Amiga, one could script the systems text editor by using
something similar to (my manuals are in storage):
/* */
address EDITOR
open "somefile.txt"
3d
i
date('n')
<esc>
save
address COMMAND
copy somefile.txt df0:
(I don't recall the notation used to actually escape out of insert mode.
Translated:
Define the editor as the command processor
Editor open file command
Move down three lines
Enter insert mode
Insert current date (date is the REXX data function, what is
inserted is the return value from calling date()
Exit insert mode
Save the file
Revert to the normal command shell
Use normal shell command to copy the file to the first floppy drive.
It's the interactive nature seen in the editor portion that is not
easy to perform using Python -- even with subprocess.Popen() and the
various read/write operations.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Opinion on best practice... Anthony Correia <akcorreia@gmail.com> - 2013-02-04 20:14 -0800
Re: Opinion on best practice... Michael Torrie <torriem@gmail.com> - 2013-02-04 23:04 -0700
Re: Opinion on best practice... Terry Reedy <tjreedy@udel.edu> - 2013-02-05 02:56 -0500
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-05 13:23 +0000
Re: Opinion on best practice... Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-02-05 08:56 +0100
Re: Opinion on best practice... Peter Otten <__peter__@web.de> - 2013-02-05 11:35 +0100
Re: Opinion on best practice... Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-02-05 14:05 +0100
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-05 13:22 +0000
Re: Opinion on best practice... Walter Hurry <walterhurry@lavabit.com> - 2013-02-05 21:01 +0000
Re: Opinion on best practice... Neil Cerutti <neilc@norwich.edu> - 2013-02-05 21:39 +0000
Re: Opinion on best practice... Ethan Furman <ethan@stoneleaf.us> - 2013-02-05 14:07 -0800
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-05 23:00 +0000
Re: Opinion on best practice... Chris Angelico <rosuav@gmail.com> - 2013-02-06 10:35 +1100
Re: Opinion on best practice... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-06 12:55 +1100
Re: Opinion on best practice... Dan Stromberg <drsalists@gmail.com> - 2013-02-05 18:14 -0800
Re: Opinion on best practice... Chris Angelico <rosuav@gmail.com> - 2013-02-06 17:16 +1100
Re: Opinion on best practice... rusi <rustompmody@gmail.com> - 2013-02-05 23:32 -0800
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-06 15:18 +0000
Re: Opinion on best practice... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-06 12:37 -0500
Re: Opinion on best practice... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-07 10:46 +1100
Re: Opinion on best practice... Chris Angelico <rosuav@gmail.com> - 2013-02-07 16:28 +1100
Re: Opinion on best practice... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-07 06:50 +0000
Re: Opinion on best practice... Chris Angelico <rosuav@gmail.com> - 2013-02-07 18:49 +1100
Re: Opinion on best practice... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-08 09:49 +1100
Re: Opinion on best practice... Chris Angelico <rosuav@gmail.com> - 2013-02-08 17:54 +1100
Re: Opinion on best practice... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-08 12:41 -0500
Re: Opinion on best practice... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-07 13:54 -0500
Re: Opinion on best practice... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-08 09:58 +1100
Re: Opinion on best practice... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-08 13:29 -0500
Re: Opinion on best practice... Chris Angelico <rosuav@gmail.com> - 2013-02-09 11:28 +1100
Re: Opinion on best practice... John Ladasky <john_ladasky@sbcglobal.net> - 2013-02-08 19:10 -0800
Re: Opinion on best practice... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-06 00:33 -0500
Re: Opinion on best practice... Anssi Saari <as@sci.fi> - 2013-02-06 15:30 +0200
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-05 22:59 +0000
Re: Opinion on best practice... Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-05 17:05 -0700
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-06 15:04 +0000
Re: Opinion on best practice... Neil Cerutti <neilc@norwich.edu> - 2013-02-06 14:20 +0000
Re: Opinion on best practice... Grant Edwards <invalid@invalid.invalid> - 2013-02-06 15:11 +0000
Re: Opinion on best practice... Nobody <nobody@nowhere.com> - 2013-02-06 03:32 +0000
Re: Opinion on best practice... Michael Torrie <torriem@gmail.com> - 2013-02-05 22:07 -0700
csiph-web