WinPops

Hari Sekhon sekhon.hari at googlemail.com
Wed Jun 21 06:44:32 EDT 2006


If you were going to do this you may as well just do something like

if sys.platform='win32':
    os.system('net send <somemachine> <somemessage>')
elif sys.platform[:5]='linux'
   os.system('smblcient -M <machine> etc...')

This would be more portable and simpler than the alternatives I've seen.

It would be better if there was just a cross platform library for this
protocol so you could just

import winpop
winpop.send (host,message)


Too much to ask?

Hari


On 01/06/06, Peter Gsellmann <peter-gsellmann at eunet.at> wrote:
>
> Roger Upole wrote:
>
> >
> > "Hari Sekhon" <sekhon.hari at googlemail.com> wrote in message
> > news:mailman.6230.1148640634.27775.python-list at python.org...
> >> Hi,
> >>   Is there a way of sending winpops (Windows Pop-Up / Net Send
> messages)
> >>   in python?
> >>
> >> Perhaps some library or something that I can use under both Windows and
> >> Linux?
> >>
> >> Hari
> >
> > On Windows, you can use win32net.NetMessageBufferSend.
> >
> >         Roger
> >
> On Linux, i use the smbclient binary:
>   from subprocess import *
>   q=Popen(['smbclient','-M','maggy'],stdin=PIPE)
>   q.stdin.write('hello!')
>   q.stdin.close()
>   q.wait()
>
> Peter
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060621/41402878/attachment.html>


More information about the Python-list mailing list