Socket Programming - Question

Grant Edwards grante at visi.com
Fri Feb 10 20:12:28 EST 2006


On 2006-02-11, duncanm255 at hotmail.com <duncanm255 at hotmail.com> wrote:

> I am relatively new to Python, and wanted to see if this is
> even possible, and if so how to go about implementing it.
> What I'm looking to do is create a client/server application
> that does the following:
>
> 1)  System2 listens on port > 1023
> 2)  System1 connects to System2 and sends traffic to it - based on the
> traffic it receives (i.e. a special string), System2 executes
> command-line commands and returns the output to System1.

Sure.  Just use os.popen() or one of it's relatives to execute
the program:

http://www.python.org/doc/current/lib/os-newstreams.html#os-newstreams

-- 
Grant Edwards                   grante             Yow!  I'm not available
                                  at               for comment...
                               visi.com            



More information about the Python-list mailing list