forked from kurtmckee/feedparser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README-PYTHON3
36 lines (26 loc) · 1.42 KB
/
README-PYTHON3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Universal Feed Parser
Parse RSS and Atom feeds in Python. 4000 unit tests. Open source.
Copyright (c) 2002-2008, Mark Pilgrim
Copyright (c) 2008-2010, multiple authors
open source, see LICENSE file for details
-----
If you're using Python 3, feedparser can be converted to work with Python 3 by
the 2to3 tool! To convert it, you can either run the convert_to_py3.sh, or you
can run the following command manually if there's a problem:
$ 2to3 -w feedparser.py feedparsertest.py
Unfortunately, sgmllib.py was deprecated in Python 2 and is no longer included
in Python 3. If a copy of sgmllib.py - ported to Python 3 - was not included
in your feedparser download, simply grab a copy from your Python 2 system
library (preferably from the Python 2.7 series) and run the 2to3 tool on it:
$ 2to3 -w sgmllib.py
You'll additionally need to edit the resulting file to remove the `warnpy3k`
lines at the top of the file. There should be four lines at the top of the file
that you can delete.
If your feedparser download included the sgmllib.py file, it's probably called
sgmllib3.py, and you can simply rename the file to sgmllib.py. (The "3"
prevents the file from conflicting with your system's existing sgmllib if
you're using Python 2.)
Because sgmllib is a part of the Python codebase, it's licensed under the
Python Software Foundation License. You can find a copy of that license at
python.org:
http://docs.python.org/license.html