Soumen banerjee wrote:
> Hello,
> for a certain app, i used to use a command:
> os.system("soundwrapper espeak -f line.txt")
> now, if i wanted to kill espeak, i would have to run:
> os.system("killall espeak")
> since the subprocess module allows sending SIGKILL to the process, i
> decided to switch to using it. However i cant pass the spaced out
> arguments to it. For example:
> a=subprocess.Popen("soundwrapper espeak -f line.txt")
> results in a OSError, no such file or directory.
> How do i use the Popen function?
> Regards
> Soumen

Read subprocess's documentation. It takes a list, not a string:

>>> a = subprocess.Popen(["soundwrapper", "espeak", "-f", "line.txt"])
-- 
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to