[Tutor] Using os.popen*() and os.spawn*() to interact with a dos-box

Alan Gauld alan.gauld at freenet.co.uk
Sat Jan 15 23:20:02 CET 2005


> Well, ultimately, what I want to be able to do is open Audacity
> (http://audacity.sourceforge.net/) at a predetermined time and have
it
> begin recording wave mix out (the default i have it set to anyway),
and
> then have it stop again when i send it a command.

This will be much easier from python than using the DOS box as
an intermediate. I use Audacity but have no idea whether it
has any kind of message interface, but at the worst case you
can generate windows message events and use the Win32 API
to send them (using PostMessage() API call) to the Audacity
window.

But since Audacity is quite a sophisticated programme I
wouldn't be surprised if it has a message based API of
its own.

> Right now I have little to no idea where to go from here. I have the
> idea of what I want to do, but no knowledge on how to do it. Once
again,
> any help would be appreciated.

If you have to use the WIin32 api then its faurly messy
and will require some experimenting from the >>> prompt
to work out exactly what you need to do. BUt its not impossibly
difficult.

If Audacity exposes an interface of its own then it shouldn't
be too hard at all, you'll need to check the Audacity docs
and web site closely.

Alan G.



More information about the Tutor mailing list