Re: [Python-Dev] socket.try_reuse_address()

2008-05-01 Thread Gregory P. Smith
On Wed, Apr 30, 2008 at 10:42 AM, Trent Nelson <[EMAIL PROTECTED]> wrote: > > if os.name == "nt": > > _socketmethods = _socketmethods + ('ioctl',) > > +_is_windows = True > > +elif os.name == 'java': > > +from java.lang import System > > +_is_windows = 'windows' in System.getProp

Re: [Python-Dev] socket.try_reuse_address()

2008-04-30 Thread Raghuram Devarakonda
On Wed, Apr 30, 2008 at 2:07 PM, Trent Nelson <[EMAIL PROTECTED]> wrote: > > > This one will not work. > > > > >>> 'windows' in System.getProperty('os.name').lower() > > Traceback (innermost last): > > File "", line 1, in ? > > TypeError: string member test needs char left operand > > >>>

Re: [Python-Dev] socket.try_reuse_address()

2008-04-30 Thread Trent Nelson
> This one will not work. > > >>> 'windows' in System.getProperty('os.name').lower() > Traceback (innermost last): > File "", line 1, in ? > TypeError: string member test needs char left operand > >>> Interesting, which version of Jython were you using? > You may have to do something like > Sy

Re: [Python-Dev] socket.try_reuse_address()

2008-04-30 Thread Raghuram Devarakonda
On Wed, Apr 30, 2008 at 1:42 PM, Trent Nelson <[EMAIL PROTECTED]> wrote: > > if os.name == "nt": > > _socketmethods = _socketmethods + ('ioctl',) > > +_is_windows = True > > +elif os.name == 'java': > > +from java.lang import System > > +_is_windows = 'windows' in System.getP

Re: [Python-Dev] socket.try_reuse_address()

2008-04-30 Thread Trent Nelson
> if os.name == "nt": > _socketmethods = _socketmethods + ('ioctl',) > +_is_windows = True > +elif os.name == 'java': > +from java.lang import System > +_is_windows = 'windows' in System.getProperty('os.name').lower() > +elif os.name == 'posix' and sys.platform == 'cygwin': > +

Re: [Python-Dev] socket.try_reuse_address()

2008-04-30 Thread Trent Nelson
> > Giampaolo Rodola' wrote: > > > Maybe it would be better considering Windows CE systems too: > > > > > > - if os.name == 'nt' > > > + if os.name in ('nt', 'ce') > > > > > Cygwin? I don't know how Unix-like it is. > > Yeah, that's a fair point, it's the behaviour of the > underlying Winsock API

Re: [Python-Dev] socket.try_reuse_address()

2008-04-29 Thread Trent Nelson
> Giampaolo Rodola' wrote: > > Maybe it would be better considering Windows CE systems too: > > > > - if os.name == 'nt' > > + if os.name in ('nt', 'ce') > > > Cygwin? I don't know how Unix-like it is. Yeah, that's a fair point, it's the behaviour of the underlying Winsock API we're targeting, s

Re: [Python-Dev] socket.try_reuse_address()

2008-04-29 Thread Steve Holden
Giampaolo Rodola' wrote: Maybe it would be better considering Windows CE systems too: - if os.name == 'nt' + if os.name in ('nt', 'ce') Cygwin? I don't know how Unix-like it is. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.hold

Re: [Python-Dev] socket.try_reuse_address()

2008-04-29 Thread Giampaolo Rodola'
Maybe it would be better considering Windows CE systems too: - if os.name == 'nt' + if os.name in ('nt', 'ce') Moreover if the method is called "try_reuse_address" I'd expect that "self._sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)" would be placed inside a try/except block. On 29 Apr, 15:58, Tr

[Python-Dev] socket.try_reuse_address()

2008-04-29 Thread Trent Nelson
Since the recent changes to networking-oriented tests (issue 2550, r62234 and r62237), I think it's safe to say stability of the test suite on all the non-Windows platforms has improved significantly in this area (I don't recall seeing any socket errors in *nix buildbot logs since those commits