Commit c4e615c45ffa76d46ac44ea2963d0d17428c764e
1 parent
d6c66765
Exists in
master
and in
5 other branches
ENH: Check python version to import PIL
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
invesalius/gui/data_notebook.py
| @@ -19,9 +19,12 @@ | @@ -19,9 +19,12 @@ | ||
| 19 | # detalhes. | 19 | # detalhes. |
| 20 | #-------------------------------------------------------------------------- | 20 | #-------------------------------------------------------------------------- |
| 21 | import sys | 21 | import sys |
| 22 | +import platform | ||
| 22 | 23 | ||
| 23 | -#import Image | ||
| 24 | -from PIL import Image | 24 | +if float(platform.python_version()[0:3]) > 2.6: |
| 25 | + import Image | ||
| 26 | +else: | ||
| 27 | + from PIL import Image | ||
| 25 | 28 | ||
| 26 | import wx | 29 | import wx |
| 27 | import wx.grid | 30 | import wx.grid |