Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82376

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

Date 2014-12-11 14:34 -0500
From Dave Angel <davea@davea.name>
Subject Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'
References <4a9fc357-d743-471b-87e1-ef3573221816@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.16864.1418326508.18130.python-list@python.org> (permalink)

Show all headers | View raw


Please give your environment when starting a new thread.  Python version 
and OS version.  In this case, I'm guessing Windows, because I have to 
guess something to give a meaningful answer.

On 12/11/2014 02:21 PM, Simon Evans wrote:
> 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:
>
<snip>
> ----------------------------------------------------------------------------
> 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
>>>>

cd is not a Python "command", it's a   cmd command.  In other words, you 
type that in your DOS box before starting Python.


-- 
DaveA

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Text Code(from 'Getting Started in Beautiful Soup'  re: cd Soup   , returns 'Syntax Error, invalid syntax' Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-12-11 11:21 -0800
  Re: Text Code(from 'Getting Started in Beautiful Soup'  re: cd Soup   , returns 'Syntax Error, invalid syntax' sohcahtoa82@gmail.com - 2014-12-11 11:26 -0800
  Re: Text Code(from 'Getting Started in Beautiful Soup'  re: cd Soup , returns 'Syntax Error, invalid syntax' Dave Angel <davea@davea.name> - 2014-12-11 14:34 -0500
  Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup ,  returns 'Syntax Error, invalid syntax' Chris Angelico <rosuav@gmail.com> - 2014-12-12 06:40 +1100
  Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax' Dave Angel <davea@davea.name> - 2014-12-11 14:46 -0500
  Re: Text Code(from 'Getting Started in Beautiful Soup'  re: cd Soup   , returns 'Syntax Error, invalid syntax' Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-12-14 06:48 -0800
    Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup ,  returns 'Syntax Error, invalid syntax' Chris Angelico <rosuav@gmail.com> - 2014-12-15 06:41 +1100

csiph-web