[TxMt] patch for python bundle (support use of reload in sitecustomize.py under python3)
Iain Lamb
x+textmate at lamb.cc
Fri Feb 13 16:52:21 UTC 2009
Salutations, list! When running scripts using the Python bundle, I noticed a
complaint from python3 about the use of reload() in sitecustomize.py. Since
reload is no longer a built in function in python3, this little one line
patch will fix the issue while still supporting python2.
Index: Python.tmbundle/Support/sitecustomize.py
===================================================================
--- Python.tmbundle/Support/sitecustomize.py (revision 11288)
+++ Python.tmbundle/Support/sitecustomize.py (working copy)
@@ -18,6 +18,7 @@
# now import local sitecustomize
try:
import sitecustomize
+ if sys.version_info[0] >= 3: from imp import reload # python 3 support
reload(sitecustomize)
except ImportError: pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20090213/61dda178/attachment.html>
More information about the textmate
mailing list