"Fossies" - the Fresh Open Source Software Archive

Member "roundup-2.0.0/roundup/anypy/urllib_.py" (29 Feb 2020, 336 Bytes) of package /linux/www/roundup-2.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "urllib_.py": 1.6.1_vs_2.0.0.

    1 
    2 try:
    3     # Python 3+
    4     from urllib.parse import quote, unquote, urlencode, urlparse, parse_qs, \
    5         urlunparse
    6     from urllib.request import urlopen
    7 except ImportError:
    8     # Python 2.5-2.7
    9     from urllib import quote, unquote, urlencode
   10     from urllib2 import urlopen
   11     from urlparse import urlparse, parse_qs, urlunparse