We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 405062d + 426eeae commit cd4cac0Copy full SHA for cd4cac0
vpython/__init__.py
@@ -10,14 +10,14 @@
10
# both of those.
11
12
from ._notebook_helpers import _isnotebook, __is_spyder
13
-import platform
14
-__p = platform.python_version()
+import sys
+__v = sys.version_info
15
16
-# Delete platform now that we are done with it
17
-del platform
+# Delete sys now that we are done with it
+del sys
18
19
-__ispython3 = (__p[0] == '3')
20
-__require_notebook = (not __ispython3) or (__p[2] < '5') # Python 2.7 or 3.4 require Jupyter notebook
+__ispython3 = (__v.major == 3)
+__require_notebook = (not __ispython3) or (__v.minor < 5) # Python 2.7 or 3.4 require Jupyter notebook
21
22
if __require_notebook and (not _isnotebook):
23
s = "The non-notebook version of vpython requires Python 3.5 or later."
0 commit comments