diff options
author | Ryan Petrello <lists@ryanpetrello.com> | 2013-05-03 12:07:50 -0400 |
---|---|---|
committer | Ryan Petrello <lists@ryanpetrello.com> | 2013-05-03 12:07:50 -0400 |
commit | 81b13c4144c636b956fac2b826b1ebf08a404641 (patch) | |
tree | d862776882114e6cf4c6bed8899b79c843a013ad /pecan/compat | |
parent | 2edea4258995038a7c4b238cb65ece68ff810528 (diff) | |
download | pecan-81b13c4144c636b956fac2b826b1ebf08a404641.tar.gz |
General import and flake8 cleanup.
Diffstat (limited to 'pecan/compat')
-rw-r--r-- | pecan/compat/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pecan/compat/__init__.py b/pecan/compat/__init__.py index 02a0631..93883f4 100644 --- a/pecan/compat/__init__.py +++ b/pecan/compat/__init__.py @@ -2,6 +2,17 @@ import inspect import six +if six.PY3: + import urllib.parse as urlparse + from urllib.parse import quote, unquote_plus + from urllib.request import urlopen, URLError + from html import escape +else: + import urlparse # noqa + from urllib import quote, unquote_plus # noqa + from urllib2 import urlopen, URLError # noqa + from cgi import escape # noqa + def is_bound_method(ob): return inspect.ismethod(ob) and six.get_method_self(ob) is not None |