SeedLink protocol details (Bernhard Morgenstern)

Hello Bernhard,

The current equivalent of the doc I used to write JSeedLink and the obspy.seedlink module seems to be here: Is not Python 3 backward compatible to v2.7 code? Best regards, Anthony

Hi Anthony,

Is not Python 3 backward compatible to v2.7 code?

Unfortunately not. Python 3 breaks backward compatibility in quite a few places. Probably the most important for the implementation of an ASCII based protocol like SeedLink is the change in native strings.

In Python 2 strings use a single byte per character. In fact, "bytes" is merely an alias for "str".

In Python 3 the string type was changed to natively support unicode strings, while "byte" has become a separate type.

This means that one cannot use strings any more to handle all the protocol's communication data, but has to explicitly specify (and convert between) usages of strings and bytes.

@mbyt has done a large part of the Py2/3 conversion in the current master, and I have opened a pull request on Github for the remaining bits:

Best,
Bernhard