Mercurial > hg > config
comparison python/hgrc.py @ 829:2bfd237c4e6c
py35
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Sun, 19 Feb 2017 17:54:57 -0800 |
| parents | 34e2b07d8cc7 |
| children | 6de24d387889 |
comparison
equal
deleted
inserted
replaced
| 828:34e2b07d8cc7 | 829:2bfd237c4e6c |
|---|---|
| 25 from StringIO import StringIO | 25 from StringIO import StringIO |
| 26 | 26 |
| 27 try: | 27 try: |
| 28 # python 2 | 28 # python 2 |
| 29 import urlparse | 29 import urlparse |
| 30 from ConfigParser import RawConfigParser as ConfigParser | |
| 30 except ImportError: | 31 except ImportError: |
| 32 # python 3 | |
| 31 import urllib.parse as urlparse | 33 import urllib.parse as urlparse |
| 34 from configparser import RawConfigParser as ConfigParser | |
| 32 | 35 |
| 33 ### global methods | 36 ### global methods |
| 34 | 37 |
| 35 def isHTTP(path): | 38 def isHTTP(path): |
| 36 """is path an {http,https}:// URL?""" | 39 """is path an {http,https}:// URL?""" |
