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

Chris Angelico rosuav at gmail.com
Sun Dec 14 14:41:14 EST 2014


On Mon, Dec 15, 2014 at 1:48 AM, Simon Evans <musicalhacksaw at yahoo.co.uk> wrote:
> Thanks Guys
> This book keeps swapping from the Python console to the Windows - without telling you, but it is the only book out there on 'Beautiful Soup' so I have got to put up with it. There's more problems with it, but I will start a new thread in regard of, I don't know if its related to the above or not.
> Yours

You may be able to recognize the consoles by their prompts. Python's
console is probably marked with ">>>" or "ipy>" or something, and the
Windows prompt most likely would have a path followed by ">"  (eg
"C:\>"). If the book's followed this convention, then you should be
able to figure things out easily enough once you get used to it.
Otherwise, look at the syntactic style: Windows command line, like
most command shells, uses a basic structure of command and arguments
separated by spaces, while Python uses a lot more symbols and
structural layout characters. But now we're getting into heuristics,
and there are some commands that work equally in Python and in Windows
(and do different things).

ChrisA



More information about the Python-list mailing list