#37 Support fileno() function in the socket protocol

closed
None
5
2014-07-31
2014-07-10
No

If the socket protocol had a fileno() function, it would allow the Serial object to be used with select().
This prevents pySerial socket protocol to be used for example with the pexpect module.

Can the socket protocol (serial.urlhandlers.protocol_socket.py) use the socket.fileno()?
I tried it and it seems to work properly under linux. I'm not sure if there is an easy way to make win32 working.

# worked under linux if I added this to serial.urlhandlers.protocol_socket.py
def fileno(self):
    return self._socket.fileno()

Discussion

  • Chris Liechti

    Chris Liechti - 2014-07-31
    • status: open --> accepted
    • assigned_to: Chris Liechti
     
  • Chris Liechti

    Chris Liechti - 2014-07-31

    makes sense, committed

     
  • Chris Liechti

    Chris Liechti - 2014-07-31
    • status: accepted --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks