[python-win32] Welcome to the "python-win32" mailing list

Joshua Lim joshua__lim at hotmail.com
Sat Dec 27 20:36:01 CET 2008

Hi everyone, 

I'm new to python or C.  I've been trying to get open source pyrad, a socket radius python app, to work on win32, and encountered an error:

Traceback (most recent call last):
  File "C:\Python25\pyrad\example\server.py", line 36, in <module>
  File "C:\Python25\pyrad\example\server.py", line 256, in Run

AttributeError: 'module' object has no attribute 'poll'

A quick Google revealed that the error has something to do with Linux poll not working under windows.  I searched Pyrad code, server.py, line 256, and this brought up the following:

    def Run(self):
        """Main loop.

        This method is the main loop for a RADIUS server. It waits
        for packets to arrive via the network and calls other methods
        to process them.

        while 1:
            for (fd, event) in self._poll.poll():
                if event==select.POLLIN:
                    except ServerPacketError, err:
                                                logger.info("Dropping packet: " + str(err))
                    except packet.PacketError, err:
                        logger.info("Received a broken packet: " + str(err))
                                        logger.error("Unexpected event in server main loop")

As i understand, i need to change the code to use select.select().  I tried replacing "select.poll()" with "select.select()" but got a new error:

TypeError: select expected at least 3 arguments, got 0

What should i do?  Would appreciate any tip.  :)


NEW! Get Windows Live FREE.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081227/31d9d4d1/attachment.htm>

More information about the python-win32 mailing list