dos promt simulation

Chris Liechti cliechti at gmx.net
Sat Apr 13 12:38:10 EDT 2002


theivo at abv.bg (I.C.) wrote in 
news:6ac1ecad.0204130435.93d0ad3 at posting.google.com:
> Hello,
> I would like to simulate a simple dos prompt using a Tk window. I use
> os.popen(command) to run some commands like 'echo', 'dir' etc... Then
> I read from the pipe and it works, but if I try to execute a command
> like 'time', which expects input, I can't read from the pipe. Is it
> possible to simulate such commands, without passing some
> parameters('time 22:10')?

there is also popen2, popen3 etc. they give you a file for stdin where you 
can write to.
(don't know if it works for _all_ dos programs. some might well read the 
keyboard through hacky ways.)

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list