Simon Evans wrote:

<zip>
> ---------------------------------------------------------------------
>>>> with open("C:\Beautiful Soup\ecologicalpyramid.html","r") as

You seem to run Python under Windows.

You have to take care of escape mechanism beyond \ char in string literals 
(see Python docs). 

By chance, \B and \e are not recognized as escape sequences, so they are 
left as is. But \a \b \f \n \r \t \v \x  will be processed differently

Double \ in your string:
        "C:\\Beautiful Soup\\ecologicalpyramid.html"

Or use a raw string by prepending a r to disable escape sequences:
        r"C:\Beautiful Soup\ecologicalpyramid.html"


<zip>

A+
Laurent.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to