Wrap a function

Joan Miller peloko45 at gmail.com
Fri Jan 29 04:06:56 EST 2010


On 29 ene, 05:44, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Thu, 28 Jan 2010 11:24:28 -0800 (PST), Joan Miller
> <pelok... at gmail.com> declaimed the following in
> gmane.comp.python.general:
>
> > On 28 ene, 19:16, Josh Holland <j... at joshh.co.uk> wrote:
> > > On 2010-01-28, Joan Miller <pelok... at gmail.com> wrote:
>
> > > > I've to call to many functions with the format:
>
> > > >>>> run("cmd")
>
> > > Check the docs on os.system().
> > No. I've a function that uses subprocess to run commands on the same
> > shell and so substitute to bash scrips. But a script full of run
> > ("shell_command --with --arguments") is too verbose.
>
>         I shall blaspheme, and suggest that maybe the language you want to
> use is REXX (ooREXX or Regina).
>
>         By default, ANY statement that can not be confused for a REXX
> language statement is sent to the currently defined command handler
> (Which on most OSs is equivalent to Python's os.system() call; the late
> Amiga, and IBM's mainframe OS had features that support defining other
> applications as command handlers).
>
>         A common practice is to put quotes about the first word of the
> command to ensure it gets treated as external command.
I prefer Python since that has a great standard library where I get a
well logging system between another things. In addition, the main
intended audience will be for system administrators who many of them
already have used it.



More information about the Python-list mailing list