Hi,<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Yesterday I finally got around to installing your ROMs on my XO. I was able got configure speech-dispatcher and get spd-say to work correctly, but when I tried to run my test python program it bailed out on the import speechd statement, saying speechd could not be found.</blockquote>
<div><br>Can I know which version of the RPM you are trying to use? <br><br>Can you try :<br><a href="http://www.nsitonline.in/hemant/stuff/speechd-rpm/speech-dispatcher-0.6.6-5.fc7.src.rpm">http://www.nsitonline.in/hemant/stuff/speechd-rpm/speech-dispatcher-0.6.6-5.fc7.src.rpm</a><br>
<br>This is actually a src RPM package and you'll have to build the RPM for your machine using it. (I am unable to upload the RPM package at the moment)<br><br>This resource will help you : <a href="http://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-src.rpm-package-on-red-hat-linux-38928/">http://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-src.rpm-package-on-red-hat-linux-38928/</a><br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">This leads to two issues for me. First, of course, is how to get the python code installed on the XO. Equally important, though, is how to write my Activity so it can work as a text reader without speech on a laptop that does not have speechd installed. If I'm going to bail out just for having "import speechd" in my app that may not be possible. Or can I do a conditional import, something like:<br>
<br>
if speechd file exists:<br>
import speechd<br>
<br>
If you have any ideas I'd like to hear them.</blockquote><div><br>Maybe you'd like to look at this link : <a href="http://www.diveintopython.org/file_handling/index.html#d0e14344">http://www.diveintopython.org/file_handling/index.html#d0e14344</a><br>
<br>It discusses how to handle the ImportError exception raised when a python module that you're trying to import is not available.<br><br>so you might have a block of code as follows:<br><br>try:<br> import speechd<br>
<pre class="programlisting"><span class="pykeyword">except</span> ImportError:<br> print "working without speech here"<br><br></pre></div></div>Best,<br>Hemant<br>