Converting from perl

sp00fD sp00fD at yahoo.com
Tue Aug 24 15:20:39 EDT 1999


In article <7pul38$5an at dfw-ixnews17.ix.netcom.com>,
  aahz at netcom.com (Aahz Maruch) wrote:
> In article <7pujub$75v$1 at nnrp1.deja.com>, sp00fD  <sp00fD at yahoo.com>
wrote:
> >
> >I'm converting to python from perl and just created my first python
> >program, it's actually a rewrite of a perl program that I had.
>
> Welcome to comp.lang.py.
>
> It would help if you explained what your script is *intended* to do.
> --
>                       --- Aahz (@netcom.com)
>
> Androgynous poly kinky vanilla queer het    <*>
http://www.rahul.net/aahz/
> Hugs and backrubs -- I break Rule 6  (if you want to know, do some
research)
>

Hmm, sorry.  Well, basically it copies a file from the local machine to
numerous remote machines, basically I use it occassionally for script
distribution, but more than anything, I did it just to learn the
language.  There are a few "preset" values (i.e. SUN, AIX), used like so

$ rcopy.py -p OTHER /this/dir/and/file /other/dir
Enter hosts: foo bar
Sending /this/dir/and/file to foo /other/dir
Sending /this/dir/and/file to bar /other/dir

The Unix way
$ for host in foo bar:
> do
> rcp $file ${host}:${dir}
> done

As you can see, a dumb program, but again...just using it to learn.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list