[yt-svn] commit/yt: astrofrog: Make version checking of IPython future-proof in iyt

Bitbucket commits-noreply at bitbucket.org
Tue May 29 12:54:55 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/46608e61b743/
changeset:   46608e61b743
branch:      yt
user:        astrofrog
date:        2012-05-29 21:31:20
summary:     Make version checking of IPython future-proof in iyt
affected #:  1 file

diff -r 6a10d998272e8cc720768f5882392e7fac683ffe -r 46608e61b743294c8a223362fe19910ab1f8a1f8 scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -1,5 +1,6 @@
 #!python
 import os, re
+from distutils import version
 from yt.mods import *
 from yt.data_objects.data_containers import AMRData
 namespace = locals().copy()
@@ -22,6 +23,11 @@
     code.interact(doc, None, namespace)
     sys.exit()
 
+if version.LooseVersion(IPython.__version__) <= version.LooseVersion('0.10'):
+    api_version = '0.10'
+else:
+    api_version = '0.11'
+
 if IPython.__version__.startswith("0.10"):
     api_version = '0.10'
 elif IPython.__version__.startswith("0.11") or \

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list