Skip to content Skip to sidebar Skip to footer

Twisted Linereceived Not Getting Called

I encountered a strange behavior when i was building a command line interface in python. Here is the striped down version of the code that can reproduce the issue. from twisted.int

Solution 1:

The reason is line delimiter constant which is set to r'\r\n' by default (MS Windows delimiter). Try to set it to '\n' (Linux and Mac OS) instead:

class CommandLine(basic.LineReceiver):
    delimiter = '\n'

Post a Comment for "Twisted Linereceived Not Getting Called"