How to simulate a TTY with popen2?

Tiziano Bettio tbettio at transnorm.ch
Thu Mar 11 18:08:24 EST 2004


Cameron Laird wrote:
> In article <c2o6pe$dn8$1 at newshispeed.ch>,
> Tiziano Bettio  <tbettio at transnorm.ch> wrote:
> 
>>Hi Everybody,
>>
>>I'm stuck trying to write a python module for the vlc videoplayer on 
>>linux (http://www.videolan.org). I'm using the popen2 module to open a 
>>pipe to the program. If I open the vlc player in a shell it recognizes 
>>that I'm running it from a TTY.
>>Same command with popen2-4 and the vlc doesn't seem to find a TTY so it 
>>tries to open a gui and fails resulting in ending itself.
>>
>>So here's my question:
>>Is there a way to open a pipe in python imitating a TTY or am I doing 
>>something completely wrong?
>>
>>Greetz TC
> 
> 
> Is Pexpect <URL: http://pexpect.sourceforge.net/ > exactly what you want?

Thx... works great!!!

TC



More information about the Python-list mailing list