python broadcast socket

2005-06-29 Thread ronpro
I'm sort of new to both Python and socket programming so I appologize ahead of 
time if this is a dumb question.  I have found that the following code works on 
windows but on linux I get an exception.

import socket
s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
s.connect( ( '', 1617 ) )

The exception I get is:

socket.error: (13, 'permission denied')


I have tried this on three Linux machines.  All firewall software is disabled.


Thanks for you time and patience.

Ron

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


socket code

2005-07-08 Thread ronpro
Hello,

I'm trying to create a broadcast socket in some portable code (windows XP & 
mandrake linux).  When I run the following lines through idle:

import socket
s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
s.connect( ('', 17100) )

On windows, connect() returns and I have a broadcast socket to which I can 
write.  One LINUX connect() just tells me 'Permission denied'.

Does anybody know why?  Any thoughts on how I can get around this?  I have to 
transmitt data to an old system.  The system only reads broadcast data on port 
17100.

Thanks for the input.

Ron Provost

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