Re: communicate with external process via pty

2012-10-10 Thread Peter Otten
Tim Arnold wrote: I have an external process, 'tralics' that emits mathml when you feed it latex equations. I want to get that mathml into a string. The problem for me is that tralics wants to talk to a tty and I've never done that before; it basically starts its own subshell. I have the

Re: communicate with external process via pty

2012-10-10 Thread Tim
On Wednesday, October 10, 2012 2:58:55 AM UTC-4, Peter Otten wrote: Tim Arnold wrote: import os,sys import subprocess import shlex import pty cmd = 'tralics --interactivemath' (master, slave) = pty.openpty() p = subprocess.Popen(shlex.split(cmd),close_fds=True,

communicate with external process via pty

2012-10-09 Thread Tim Arnold
I have an external process, 'tralics' that emits mathml when you feed it latex equations. I want to get that mathml into a string. The problem for me is that tralics wants to talk to a tty and I've never done that before; it basically starts its own subshell. I have the following code which