Remote script execution with Python ...

Gillou glenfant at equod.com.nospam
Wed Mar 7 06:30:09 EST 2001


rsh is in cygwin distribution (www.cygwin.com) so... this script should work
with any python version on any Win32 system if the client script is launched
from cygwin bash.
"Ben Hutchings" <ben.hutchings at roundpoint.com> a écrit dans le message news:
ulmqil8qu.fsf at roundpoint.com...
> "Robert Gahan" <gahanr at gofree.indigo.ie> writes:
>
> > Hi there,
> >
> > I have installed python on a Windows PC and I am looking to
> > remotely execute a script on a UNIX box from a python program.
> > I need to be able to pipe a "y" to stdin also. Is there a windows
> > equivalent of the unix "rexec" that could help me ?. What is the
> > most appropriate way of doing this ?.
>
> You might be able to do this with something like:
>
>     script_in, script_out = os.popen2("rsh otherhost -c myscript")
>     print >>script_in 'y'
>     result = script_out.readlines()
>
> Windows 2000 includes an rsh client but I'm not sure about other
> versions of Windows.  You might want to use ssh instead for greater
> security.
>
> --
> Any opinions expressed are my own and not necessarily those of Roundpoint.




More information about the Python-list mailing list