projects
/
ipython-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e0200a
)
Add Python 2.x compatibility for urllib's urlencode
author
W. Trevor King
<wking@tremily.us>
Sun, 14 Apr 2013 18:40:51 +0000
(14:40 -0400)
committer
W. Trevor King
<wking@tremily.us>
Sun, 14 Apr 2013 18:40:51 +0000
(14:40 -0400)
ipythonirc/__init__.py
patch
|
blob
|
history
diff --git
a/ipythonirc/__init__.py
b/ipythonirc/__init__.py
index e49b042284e45e3392e4a376c18e27640574bfb4..297d8c82082caf0435a96b1418a860e0a0e708ef 100644
(file)
--- a/
ipythonirc/__init__.py
+++ b/
ipythonirc/__init__.py
@@
-18,7
+18,10
@@
"""An IRC iframe using webchat.freenode.net
"""
-import urllib.parse as _urllib_parse
+try: # Python 3.x
+ import urllib.parse as _urllib_parse
+except ImportError: # Python 2.x
+ import urllib as _urllib_parse # for urlencode
import IPython.display as _IPython_display