listener program in Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • diffuser78@gmail.com

    #1

    listener program in Python

    I want to write a simple clinet/server program that does the following.

    On Windows, the program listens to the request from linux box

    On Linux Box, client program send server a shutdown request and the
    program at server i.e windows shuts windows sown,

    I basically want to remotely shut down windows from linux and write
    such a program in python.

    Every help is appreciated.

  • simon.hibbs@gmail.com

    #2
    Re: listener program in Python

    diffuser78@gmai l.com wrote:
    [color=blue]
    > I basically want to remotely shut down windows from linux and write
    > such a program in python.[/color]

    You probably don't need to write a service in windows for this. All you
    need is to write your Linux python program with an SNMP library and
    configure the Windows box to accept SNMP calls to shut down. Frankly
    I'm not 100% sure how to do this. You'd have to enable the SNMP Agent
    on Windows, and probably the "Force shutdown from a remote system"
    system policy would have to be changed.

    The O'Reilly book "Python programming on Win32" explains how to write
    Windows services and do basic networking. This article explains one
    way: http://tinyurl.com/ezjx7

    Simon Hibbs

    Comment

    • bruno at modulix

      #3
      Re: listener program in Python

      simon.hibbs@gma il.com wrote:[color=blue]
      > diffuser78@gmai l.com wrote:
      >
      >[color=green]
      >>I basically want to remotely shut down windows from linux and write
      >>such a program in python.[/color]
      >[/color]
      FWIW, s/from linux/from another machine/

      --
      bruno desthuilliers
      python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
      p in 'onurb@xiludom. gro'.split('@')])"

      Comment

      Working...