[Python-Dev] socket.try_reuse_address() (original) (raw)

Raghuram Devarakonda draghuram at gmail.com
Wed Apr 30 20:01:35 CEST 2008


On Wed, Apr 30, 2008 at 1:42 PM, Trent Nelson <tnelson at onresolve.com> wrote:

> if os.name == "nt": > socketmethods = socketmethods + ('ioctl',) > + iswindows = True > +elif os.name == 'java': > + from java.lang import System > + iswindows = 'windows' in System.getProperty('os.name').lower()

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

You may have to do something like System.getProperty('os.name').lower().find('windows').



More information about the Python-Dev mailing list