Sending a command to a program using os.system (was [Tutor]:
Using os.popen*() and os.spawn*() to interact with a DOS box)
Kent Johnson
kent37 at tds.net
Sun Jan 16 14:10:18 CET 2005
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 Snack Sound
Toolkit in particular. http://www.speech.kth.se/snack/
OTOH if what you want is some kind of macro system for Audacity then this won't help.
Kent
Orri Ganel wrote:
> 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 'R' key:
>
> os.system(r'c:\progra~1\audacity/audacity.exe R')
>
> All this managed to accomplish was Audacity opening (good) and a message
> from Audacity (not good):
>
>
>
> ("Could not open file: R" since i had to make it small to fit in the
> email message comfortably)
>
> Any ideas on a) why this didn't work and b) what to do to make something
> similar work are greatly appreciated.
>
> Thanks in advance,
> Orri
>
> --
> Email: singingxduck AT gmail DOT com
> AIM: singingxduck
> Programming Python for the fun of it.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list