Re: Wrap a function

2010-02-05 Thread Aahz
In article , Dennis Lee Bieber wrote: >On 4 Feb 2010 16:18:04 -0800, a...@pythoncraft.com (Aahz) declaimed the >following in gmane.comp.python.general: >> >> But in bash scripting, you'd just use rsync or cp or rm -- maybe an >> example would make clearer how REXX differs from bash. > > I

Re: Wrap a function

2010-02-04 Thread Aahz
In article , Dennis Lee Bieber wrote: >On 3 Feb 2010 08:38:47 -0800, a...@pythoncraft.com (Aahz) declaimed the >following in gmane.comp.python.general: >> In article , >> Dennis Lee Bieber wrote: >>> >>> I shall blaspheme, and suggest that maybe the language you want to >>>use is REXX (ooRE

Re: Wrap a function

2010-02-03 Thread Ben Finney
Dan Stromberg writes: > Ben Finney wrote: > > It's no sin to say that Python isn't a good choice for specific > > things; and “I want to write programs by indistinguishably mixing > > statements with external system calls” is one of them, IMO > > From > http://stromberg.dnsalias.org/~dstromberg

Re: Wrap a function

2010-02-03 Thread Dan Stromberg
Ben Finney wrote: Dennis Lee Bieber writes: On Thu, 28 Jan 2010 11:24:28 -0800 (PST), Joan Miller: On 28 ene, 19:16, Josh Holland wrote: 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 ba

Re: Wrap a function

2010-02-03 Thread Dan Stromberg
Joan Miller wrote: On 28 ene, 21:40, Jonathan Gardner wrote: On Jan 28, 10:20 am, Joan Miller wrote: I've to call to many functions with the format: run("cmd") were "cmd" is a command with its arguments to pass them to the shell and run it, i.e. run("

Re: Wrap a function

2010-02-03 Thread Aahz
In article , Dennis Lee Bieber wrote: > > 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

Re: Wrap a function

2010-01-29 Thread Joan Miller
On 29 ene, 05:44, Dennis Lee Bieber wrote: > On Thu, 28 Jan 2010 11:24:28 -0800 (PST), Joan Miller > declaimed the following in > gmane.comp.python.general: > > > On 28 ene, 19:16, Josh Holland wrote: > > > On 2010-01-28, Joan Miller wrote: > > > > > I've to call to many functions with the form

Re: Wrap a function

2010-01-29 Thread Joan Miller
On 28 ene, 22:57, John Posner wrote: > On 1/28/2010 3:45 PM, Joan Miller wrote: > > > > > On 28 ene, 20:34, Joan Miller  wrote: > >> On 28 ene, 20:20, Peter  wrote: > > >>> On Jan 29, 6:58 am, John Posner  wrote: > > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > On 28 ene, 19:16, Josh Ho

Re: Wrap a function

2010-01-29 Thread Joan Miller
On 28 ene, 23:36, Jonathan Gardner wrote: > On Jan 28, 2:16 pm, Joan Miller wrote: > > > > > There would be to make a function for each system command to use so it > > would be too inefficient, and follow the problem with the quotes. > > > The best is make a parser into a compiled language > > Ye

Re: Wrap a function

2010-01-28 Thread Chris Rebert
On Thu, Jan 28, 2010 at 9:44 PM, Dennis Lee Bieber wrote: > On Thu, 28 Jan 2010 11:24:28 -0800 (PST), Joan Miller > declaimed the following in > gmane.comp.python.general: > > > On 28 ene, 19:16, Josh Holland wrote: > > > On 2010-01-28, Joan Miller wrote: > > > > > > > I've to call to many func

Re: Wrap a function

2010-01-28 Thread Ben Finney
Dennis Lee Bieber writes: > On Thu, 28 Jan 2010 11:24:28 -0800 (PST), Joan Miller: > > On 28 ene, 19:16, Josh Holland wrote: > > > 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

Re: Wrap a function

2010-01-28 Thread alex23
Joan Miller wrote: > Does anybody knows any library to help me to avoid the use of the main > quotes, and brackets? > I would to use anything as: > $ ls /home => run("ls /home") It's not a library, but IPython[1] provides a lot of what you're after: IPython 0.9.1 -- An enhanced Interactive Pytho

Re: Wrap a function

2010-01-28 Thread Jonathan Gardner
On Jan 28, 2:16 pm, Joan Miller wrote: > > There would be to make a function for each system command to use so it > would be too inefficient, and follow the problem with the quotes. > > The best is make a parser into a compiled language > Yeah, you could do that. Or you can simply rely on /bin/sh

Re: Wrap a function

2010-01-28 Thread John Posner
On 1/28/2010 3:45 PM, Joan Miller wrote: On 28 ene, 20:34, Joan Miller wrote: On 28 ene, 20:20, Peter wrote: On Jan 29, 6:58 am, John Posner wrote: On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandwrote: On 2010-01-28, Joan Millerwrote: I've to call t

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 21:40, Jonathan Gardner wrote: > On Jan 28, 10:20 am, Joan Miller wrote: > > > > > I've to call to many functions with the format: > > > >>> run("cmd") > > > were "cmd" is a command with its arguments to pass them to the shell > > and run it, i.e. > > > >>>  run("pwd") > > or > > >>> r

Re: Wrap a function

2010-01-28 Thread Jonathan Gardner
On Jan 28, 10:20 am, Joan Miller wrote: > I've to call to many functions with the format: > > >>> run("cmd") > > were "cmd" is a command with its arguments to pass them to the shell > and run it, i.e. > > > > >>>  run("pwd") > or > >>> run("ls /home") > > Does anybody knows any library to help me

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 20:34, Joan Miller wrote: > On 28 ene, 20:20, Peter wrote: > > > On Jan 29, 6:58 am, John Posner wrote: > > > > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > > > On 28 ene, 19:16, Josh Holland  wrote: > > > >> On 2010-01-28, Joan Miller  wrote: > > > > >>> I've to call to many functi

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 20:20, Peter wrote: > On Jan 29, 6:58 am, John Posner wrote: > > > > > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > > On 28 ene, 19:16, Josh Holland  wrote: > > >> On 2010-01-28, Joan Miller  wrote: > > > >>> I've to call to many functions with the format: > > > >> run("cmd") > >

Re: Wrap a function

2010-01-28 Thread Peter
On Jan 29, 6:58 am, John Posner wrote: > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > On 28 ene, 19:16, Josh Holland  wrote: > >> On 2010-01-28, Joan Miller  wrote: > > >>> I've to call to many functions with the format: > > >> run("cmd") > > >> Check the docs on os.system(). > > No. I've a

Re: Wrap a function

2010-01-28 Thread Sean DiZazzo
On Jan 28, 12:13 pm, Joan Miller wrote: > On 28 ene, 19:58, John Posner wrote: > > > > > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > > On 28 ene, 19:16, Josh Holland  wrote: > > >> On 2010-01-28, Joan Miller  wrote: > > > >>> I've to call to many functions with the format: > > > >> run("cm

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 19:58, John Posner wrote: > On 1/28/2010 2:24 PM, Joan Miller wrote: > > > On 28 ene, 19:16, Josh Holland  wrote: > >> On 2010-01-28, Joan Miller  wrote: > > >>> I've to call to many functions with the format: > > >> run("cmd") > > >> Check the docs on os.system(). > > No. I've a fu

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 19:54, Steve Holden wrote: > Joan Miller wrote: > > On 28 ene, 19:16, Josh Holland wrote: > >> On 2010-01-28, Joan Miller 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

Re: Wrap a function

2010-01-28 Thread John Posner
On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Holland wrote: On 2010-01-28, Joan Miller 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 s

Re: Wrap a function

2010-01-28 Thread Steve Holden
Joan Miller wrote: > On 28 ene, 19:16, Josh Holland wrote: >> On 2010-01-28, Joan Miller 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 substitu

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 19:16, Josh Holland wrote: > On 2010-01-28, Joan Miller 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

Re: Wrap a function

2010-01-28 Thread Josh Holland
On 2010-01-28, Joan Miller wrote: > I've to call to many functions with the format: > run("cmd") Check the docs on os.system(). -- Josh "dutchie" Holland http://www.joshh.co.uk/ http://twitter.com/jshholland http://identi.ca/jshholland -- http://mail.python.org/mailman/listinfo/python-l

Wrap a function

2010-01-28 Thread Joan Miller
I've to call to many functions with the format: >>> run("cmd") were "cmd" is a command with its arguments to pass them to the shell and run it, i.e. >>> run("pwd") or >>> run("ls /home") Does anybody knows any library to help me to avoid the use of the main quotes, and brackets? I would to us