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 <[EMAIL PROTECTED] > wrote:
Roger Upole wrote:

>
> "Hari Sekhon" < [EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> 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

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to