summaryrefslogtreecommitdiff
path: root/bs4/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r--bs4/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py
index 68e9fed..b7f4898 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -42,6 +42,10 @@ from .element import (
Tag,
)
+# The very first thing we do is give a useful error if someone is
+# running this code under Python 3 without converting it.
+syntax_error = u'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work. You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'
+
class BeautifulSoup(Tag):
"""
This class defines the basic interface called by the tree builders.