| Tor Norbye | c667c1f | 2014-05-28 17:06:51 -0700 | [diff] [blame^] | 1 | import sys |
| 2 | |
| 3 | def versionok_for_gui(): |
| 4 | ''' Return True if running Python is suitable for GUI Event Integration and deeper IPython integration ''' |
| 5 | # We require Python 2.6+ ... |
| 6 | if sys.hexversion < 0x02060000: |
| 7 | return False |
| 8 | # Or Python 3.2+ |
| 9 | if sys.hexversion >= 0x03000000 and sys.hexversion < 0x03020000: |
| 10 | return False |
| 11 | # Not supported under Jython nor IronPython |
| 12 | if sys.platform.startswith("java") or sys.platform.startswith('cli'): |
| 13 | return False |
| 14 | |
| 15 | return True |
| 16 | |