<div dir="ltr">I've pasted the following from my python shell. Please note that the first two lines of code are taken directly from the standard tutorial files under section <a href="http://3.1.2." target="_blank">3.1.2.</a> Will someone please tell me why something as basic and straightforward as this will not work? Everything else seems to work just fine, but not this. All I need is someway to get the length of a string...<br>
<div class="gmail_quote"><div dir="ltr"><span style="font-family: courier new,monospace;">
<br>please help,<br><br>nosh<br><br><br>Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Type "copyright", "credits" or "license()" for more information.</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ****************************************************************</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Personal firewall software may warn about the connection IDLE</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> makes to its subprocess using this computer's internal loopback</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> interface. This connection is not visible on any external</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> interface and no data is sent to or received from the Internet.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ****************************************************************</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">IDLE 1.2.2 ==== No Subprocess ====</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>>> s = 'supercalifragilisticexpialidocious'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>>> len(s)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Traceback (most recent call last):</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> File "<pyshell#1>", line 1, in <module></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> len(s)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">TypeError: 'str' object is not callable</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>>> s</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">'supercalifragilisticexpialidocious'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>>> len(s)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Traceback (most recent call last):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> File "<pyshell#3>", line 1, in <module></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> len(s)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">TypeError: 'str' object is not callable</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>>></span><br style="font-family: courier new,monospace;"></div>
</div><br></div>