On Tue, Apr 3, 2012 at 8:05 AM, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > On Thu, 29 Mar 2012 08:48:53 -0700 (PDT), Steve Howell > <showel...@yahoo.com> declaimed the following in > gmane.comp.python.general: > > REXX is inhibited by the architectures to which it has been ported > -- limiting the ADDRESS targets to variations of Python's os.system() or > popen() calls; even the subprocess module can't get beyond the all or > nothing execution model. > > Much different from the original IBM environment (and, biased, the > Amiga implementation may have gone beyond the IBM one in capabilities) > wherein compliant programs become the "command shell" for REXX command > processing -- actual bidirectional interactive interprocess > communication. Window's COM system offers some of that capability, but > buried in a cryptic object programming system -- nothing like having a > script sending the /same/ command that one would use in a text interface > to the target program.
Some years ago, I wrote a MUD that used REXX as its scripting language. (The server's still running, but not so much to be a MUD as to be my administrative interface to that particular box. I'm like that with MUDs.) I thought it was really cool to be able to simply put a bare string and have that get sent to the player - for instance: /* Command handler for some particular location in the MUD */ if arg(1)="foo" then do "You begin to foo." /* do some stuff */ "You finish fooing." end Having now built MUDs in Pike, I'm not so impressed with the syntax. But hey, it's a completely different use of the ADDRESS command! :) And of course, I can always use ADDRESS CMD "blah blah" to execute commands. On Tue, Apr 3, 2012 at 10:25 AM, Steve Howell <showel...@yahoo.com> wrote: > On Apr 2, 2:50 pm, Chris Angelico <ros...@gmail.com> wrote: >> Hmm... How do you pipe one command's output into another's input using >> Python? It's not nearly as clean as it is in bash. > > For pipes, I'd still call out to bash. I know that's cheating, but > the idea is that Python can wrap all the good parts of bash while > still allowing you to use Python's more modern syntax, standard > library, etc. So, it's not that Python is a superset of bash, but that Python+bash is a superset of bash. Well, that is certainly understandable. And needn't be too onerous syntactically either: from os import system as x x('do_stuff') ChrisA -- http://mail.python.org/mailman/listinfo/python-list