Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

Simon Evans musicalhacksaw at yahoo.co.uk
Thu Dec 11 14:21:32 EST 2014


At the start of Chapter 3 of 'Getting Started in Beautiful Soup' it has said to create a html file, 'ecological 

pyramid.html' - which I have already done re:
----------------------------------------------------------------------------
<html>
<body>
<div class="ecopyramid">
<ul id= "producers">
<li class="producers">
<li class="producerlist">
<div class="name">plants</div>
<div class="number">100000</div>
</li>
<li class="producerlist">
<div class="name">algae</div>
<div class="number">100000</div>
</li>
</ul>
<ul id ="primaryconsumers">
<li class="primaryconsumerlist">
<div class="name">deer</div>
<div class-"number">1000</div>
</li
<li class="primaryconsumerlist">
<div class="name">deer</div>
<div class="number">1000</div>
</li>
<li class="primaryconsumerlist">
<div class="name">rabbit</div>
<div class="number">2000</div>
</li>
</ul>
<ul id="secondaryconsumers">
<li class="secondary consumerlist">
<div class="name">fox</div>
<div class="number">100</div>
</li>
<li class=secondaryconsumerlist">
<div class="name">bear</div>
<div class="number">100</div>
</li>
</ul>
<ul id="tertiaryconsumers">
<li class="tertiaryconsumerslist">
<div class="name">lion</div>
<div class="number">80</div>
</li>
<li class="tertiaryconsumerlist">
<div class="name">tiger</div>
<div class="number">50</div>
</li>
</ul>
</body>
</html>
----------------------------------------------------------------------------
and ran it okay in 'Explorer', and text then says to save it to a folder named 'Soup' which I have done. 
On the next page (30) it says to navigate to that folder with the following  code to the python console :-
 
cd Soup

however console rejects that code with the following return: - 
----------------------------------------------------------------------------
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> cd Soup
  File "<stdin>", line 1
    cd Soup
          ^
SyntaxError: invalid syntax
>>>
----------------------------------------------------------------------------
Thank you for reading, hope you can help.
Yours
Simon Evans



More information about the Python-list mailing list