Saturday, May 22, 2010

The beauty of Python: subprocess module - part 3

This is just a simple example about module subprocess.
We need to install "espeak" . On fedora usse this command:
#yum install espeak

Now the example is:

>>> import subprocess   
>>> subprocess.call(["espeak", "-s 120","-p 100","This is a test"])
0
>>>   

We hear "This is a test".
This is all .

2 comments:

啟佐 said...

三分之一的人生,可以決定另外三分之二的人生!!共勉哦!.............................................

韋于倫成 said...

好東西要和好朋友分享--感謝您........................................

Post a Comment