How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console oridle versions.

D

Dave Angel

Dear Programmers, I noticed a couple of typos in my previous message, so have now altered them thus :-

Dear Programmers,
As anticipated, it has not been to long before I have encountered further

difficulty.

Your first thread was about getting Beautiful Soup installed and
working. If you can successfully import it, you're ready for a new
thread, new subject line, etc.

Note the new thread's opener should be self-contained, meaning you
should mention the environment (version of BS, version of Python,
version of what OS), and your difficulty.
At the top of page 16 of 'Getting Started with Beautiful Soup" it

gives code to be input, whether to the Python or Windows command prompt I am not


My guess is that the book is now describing what goes in a program, not
at the "command prompts". A program is typically written in a text
file, not at the interpreter prompt, though experimentation is certainly
done there.

Once you have a program in a text file (usually with the extension .py),
you run it at the OS terminal prompt by typing:
python myprogram.py
 
R

Rustom Mody

Dear Programmers,

As anticipated, it has not been to long before I have encountered further

difficulty. At the top of page 16 of 'Getting Started with Beautiful Soup" it

gives code to be input, whether to the Python or Windows command prompt I am not

sure, but both seem to be resistant to it. I quote the response to the code below,

It was because I thought I saw such a mixup in your earlier posts that
I suggested you start with the python tutorial :)
Looking at the bottom of page 16, there is more code for the inputting of, that



again does not take to the Windows Command Prompt or the Python command prompt,

re: import urllib2

from bs4 import BeautifulSoup

You probably need the above line
And you need to preceded the other lines at the python (not shell) prompt

On the whole it may be a good idea to put aside the book and just follow the quick start http://www.crummy.com/software/BeautifulSoup/bs4/doc/#quick-start

at the python prompt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,075
Messages
2,570,562
Members
47,197
Latest member
NDTShavonn

Latest Threads

Top