0

How can I automate task's which need a display to run , eg: ncmpcpp . I am using python to do this but the error is as follows Error opening terminal: unknown.\r. Is there any other means I can do it ? I am using a module called pexpect in python to do this. And I don't want the terminal window to open . An eg of the automation can be that, ncmpcc opens its playlist which is done by pressing 2 and then getting the result as stoud or a log file.

As I am using python to do it. I am using a module called pexpect to do it. The code is pretty simple .

import pexpect

child = pexpect.spawn("ncmpcpp")

time.sleep(2)

child.sendline("q")

print(child.read())

But when I run the error comes

MrHola21
  • 101

0 Answers0