<div class="gmail_quote">On Fri, Jan 15, 2010 at 6:26 PM, Alex Hall <span dir="ltr">&lt;<a href="mailto:mehgcap@gmail.com">mehgcap@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all<br>
I am getting a &quot;syntax error&quot; on the line<br>
def sayUsedRam():<br>
and I am not sure why. Nothing is wrong with that line, but I was playing with the preceeding function when this started happening. Does anyone see anything obvious about these two functions that would cause an error? I do not always trust errors with line numbers to give me the right line number. Thanks in advance for any help.<br>

<br>
def sayLoad():<br>
i=0<br>
#get proc load, currently only first core for some reason<br>
load=[]<br>
for p in c.Win32_PerfFormattedData_PerfOS_Processor():<br>
 load.push(p.PercentProcessorTime)<br>
 #speaker.say(str(load))<br>
 i=i+1<br>
#end for<br>
speaker.say(str(load[0])+&quot;, &quot;+str(load[1])<br>
#end def<br>
<br>
def sayUsedRam():<br>
#get total ram and ram available<br>
#then speak used ram as a percent, rounded to 1 place<br>
for info in c.Win32_OperatingSystem():<br>
 ram=info.TotalVisibleMemorySize<br>
 freeRam=info.FreePhysicalMemory<br>
#end for<br>
#speaker.say(toBiggestBytes(freeRam,2)+&quot;. &quot;)<br>
used=100-(float(freeRam)/float(ram)*100)<br>
speaker.say(str(round(used,1))+&quot;% ram used.&quot;)<br>
#end def<br>
<br>
<br>
Have a great day,<br>
Alex<br>
Email: <a href="mailto:mehgcap@gmail.com" target="_blank">mehgcap@gmail.com</a> <br></blockquote></div><br>You appear to be missing a close paren on this line:<br><br>speaker.say(str(load[0])+&quot;, &quot;+str(load[1])<br>
<br>in the sayLoad() function<br><br>Kevin Horn<br>