35 import os |
35 import os |
36 import traceback |
36 import traceback |
37 import time |
37 import time |
38 import logging |
38 import logging |
39 |
39 |
40 from PyQt4.QtCore import qWarning, QLibraryInfo, QTimer |
40 try: |
41 from PyQt4.QtGui import QApplication |
41 from PyQt4.QtCore import qWarning, QLibraryInfo, QTimer |
|
42 from PyQt4.QtGui import QApplication |
|
43 except ImportError: |
|
44 try: # Py2 |
|
45 import tkMessageBox as messagebox |
|
46 except ImportError: |
|
47 try: # Py3 |
|
48 from tkinter import messagebox |
|
49 except ImportError: |
|
50 sys.exit(100) |
|
51 messagebox.showerror( |
|
52 "eric5 Error", |
|
53 "PyQt4 could not be imported. Please make sure" |
|
54 " it is installed and accessible.") |
|
55 sys.exit(100) |
42 |
56 |
43 # some global variables needed to start the application |
57 # some global variables needed to start the application |
44 args = None |
58 args = None |
45 mainWindow = None |
59 mainWindow = None |
46 splash = None |
60 splash = None |