File: p3.py

package info (click to toggle)
python-social-auth 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,828 kB
  • ctags: 3,245
  • sloc: python: 12,867; makefile: 119; sh: 3
file content (15 lines) | stat: -rw-r--r-- 499 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import six
# Python3 support, keep import hacks here

if six.PY3:
    from urllib.parse import parse_qs, urlparse, urlunparse, quote, \
                             urlsplit, urlencode, unquote
    from io import StringIO
else:
    try:
        from urlparse import parse_qs
    except ImportError:  # fall back for Python 2.5
        from cgi import parse_qs
    from urlparse import urlparse, urlunparse, urlsplit
    from urllib import urlencode, unquote, quote
    from StringIO import StringIO