peterbrittain / asciimatics

A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom subprocess integration

brd002 opened this issue · comments

Hi,
I have a library function that runs a shell command via subprocess.Popen and print dots if command is executed but ouputs nothing to stdout.
To run an interactive shell command, i use terminal.py. But this example also uses subprocess.
Is there a way to integrate the library function and example code using the built in ascimatics function, or maybe you can give me some advice if possible?

Hmmm... Libraries shouldn't really make assumptions about the environment like that.

My guess is that the easiest thing to do would be to run the shell command directly. If you have to use the library, you need to explain better what is wrong. Printing dots is putting stuff to stdout (in the parent process). I assume that this is deliberate and the library is purposely doing it while swallowing any stdout from the child.

Sounds to me like you want the child stdout, but the library doesn't give you access to it. If so, I'm afraid you have to change the library.

Thank you for your answer, i suppose the library should be changed.