~jaraco/beautifulsoup/easy-installable

« back to all changes in this revision

Viewing changes to src/beautifulsoup/README.txt

  • Committer: Leonard Richardson
  • Date: 2009-04-10 15:45:04 UTC
  • Revision ID: leonard.richardson@canonical.com-20090410154504-qct3a3wsnzxnkvxn
Hooked up the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Introduction
 
2
============
 
3
 
 
4
  >>> from beautifulsoup import BeautifulSoup
 
5
  >>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
 
6
  >>> print soup.prettify()
 
7
  <p>
 
8
   Some
 
9
   <b>
 
10
    bad
 
11
    <i>
 
12
     HTML
 
13
    </i>
 
14
   </b>
 
15
  </p>
 
16
 
 
17
  >>> soup.find(text="bad")
 
18
  u'bad'
 
19
 
 
20
  >>> soup.i
 
21
  <i>HTML</i>
 
22
 
 
23
 
 
24
Python 3
 
25
========
 
26
 
1
27
The canonical version of Beautiful Soup is the Python 2 version. You
2
28
can generate the Python 3 version by running to3.sh, or by doing what
3
29
to3.sh does: run 2to3 on BeautifulSoup.py and BeautifulSoupTests.py,
4
30
then applying the appropriate .3.diff file to each generated script.
5
31
 
6
32
The testall.sh script tests both the Python 2 version and a freshly
7
 
generated Python 3 version.
 
 
b'\\ No newline at end of file'
 
33
generated Python 3 version.