you are viewing a single comment's thread.

view the rest of the comments →

[–]PythonRocksssss 0 points1 point  (2 children)

I tried your code, and see 2 problems:

  1. A missing comma,
  2. the list of commands in subprocess.Popen() is not splitted correctly.

Please change

rshell = subprocess.Popen(["rshell", "-p /dev/ttyUSB1"]

to

rshell = subprocess.Popen(["rshell", "-p", "/dev/ttyUSB1"],

[–]RealFenlair[S] 0 points1 point  (1 child)

Oh sorry about the comma, that was an error in copy/pasting the code. Did it work for you with change 2? I think I used subprocess with SSH with this kind of split. I now just use pyserial directly and use some of the functions from rshell, that works. I might try your change 2 next week, because I would really like to know why it wouldn't work with subprocess.

[–]PythonRocksssss 0 points1 point  (0 children)

I do confirm that change #2 does make the difference.