Re: Sending a command to a program using os.system (was [Tutor]: Using os.popen*() and os.spawn*() to interact with a DOS box)

2005-01-18 Thread Kent Johnson
You might be interested in this: http://www.tizmoi.net/watsup/intro.html Kent Orri Ganel wrote: Actually, what I want to do is set Audacity up so that it automatically begins recording when a song plays in Windows Media Player (to begin with) and stops when the song is finished playing. I've

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

2005-01-16 Thread Alan Gauld
Hoo boy . . . Looking at the 'help' of the win32api has left this newbie hopelessly confused . . . Anyone who knows of a good Win32 tutorial, please let me know! Frankly, anyone doing anything serious on Win32 in Python should buy Mark Hammond's book. It covers most things to do with Windows

Re: Sending a command to a program using os.system (was [Tutor]: Using os.popen*() and os.spawn*() to interact with a DOS box)

2005-01-16 Thread Orri Ganel
Kent Johnson wrote: Can you say something about why you want to do this? If you are trying to turn Audacity into a programmable sound processor, you might do better with something that is designed as a library for programmatic use. Googling 'python sound library' gives some promising hints. The

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

2005-01-15 Thread Alan Gauld
I'm trying to use Python to start the dos-box (cmd.exe) and be able to call commands on it and receive output from it. The Command window is just a terminal, there is no output to be had other than an exit code when it closes. However, none of the documentation for popen and spawn cover this

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

2005-01-15 Thread Orri Ganel
Alan Gauld wrote: I'm trying to use Python to start the dos-box ("cmd.exe") and be able to call commands on it and receive output from it. The Command window is just a terminal, there is no output to be had other than an exit code when it closes.

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

2005-01-15 Thread Alan Gauld
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

Sending a command to a program using os.system (was [Tutor]: Using os.popen*() and os.spawn*() to interact with a DOS box)

2005-01-15 Thread Orri Ganel
I did some googling, and found this in the archives of this mailing list: import os os.system('c:\\abaqus\\5.8-14\\abaqus.exe post') , where post was a command, *not* a file. Now, I tried something similar, since essentially what I wish to be able to do is have Audacity think I typed the