ReddyKilowatt / pyDriveWire

Python Implementation of DriveWire 4
1 stars 0 forks source link

Strings returned via the remote REPL interface have the wrong linefeed settings #4

Open ReddyKilowatt opened 3 years ago

ReddyKilowatt commented 3 years ago

When using the following command in the server console pyDriveWire> dw config show

the following is displayed

option accept True option port 65503 option cmdPort 6809 option debug 1 option printFormat pdf option printDir C:\Users\z48176zz\AppData\Local\Temp option printPrefix cocoprints dw disk insert 0 junk.dsk

When sending the same command through the remote REPL, the following is returned:

b'option accept True\n\roption port 65503\n\roption cmdPort 6809\n\roption debug 1\n\roption printFormat pdf\n\roption printDir C:\Use rs\z48176zz\AppData\Local\Temp\n\roption printPrefix cocoprints\n\rdw disk insert 0 junk.dsk\n'

ReddyKilowatt commented 3 years ago

Mike said it's a BIG job to fix this correctly. The best way to fix it for now, is to

replace the \n with \n\r (or whatever the correct sequence is) in the return from the read below. print(s.read())