commands.getoutput help

Jerry 2jerry at writeme.com
Tue Feb 22 18:51:55 EST 2000


with : rsync = commands.getoutput('rsync %s %s' % (source,destination))
that is better
 I personnally prefer : concate +
 rsync = commands.getoutput('rsync "+source+" "+destination)
easiest to read ...


Best regards, Jerry the foolish dracomorpheus, jerome VACHER - france -
Paris -

yo_james at my-deja.com a écrit dans le message
<88v5nm$nu5$1 at nnrp1.deja.com>...
>Hello,
>
>I was wondering if it was possible to pass a
>string into the commands.getoutput module?  Here
>is an example of what I want to do:
>
>source = '/home/from/'
>destination = '/home/to/'
># rsync copies files from the source to a
># destination
>rsync = commands.getoutput('rsync %s %s')
>%(source,destination)
>
>Any help will be greatly appreciated.
>
>James
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.





More information about the Python-list mailing list