eric7/eric7.py

branch
eric7
changeset 8314
e3642a6a1e71
parent 8312
800c432b34c8
child 8318
962bce857696
equal deleted inserted replaced
8313:dac33c7fce07 8314:e3642a6a1e71
43 try: 43 try:
44 from tkinter import messagebox 44 from tkinter import messagebox
45 except ImportError: 45 except ImportError:
46 sys.exit(100) 46 sys.exit(100)
47 messagebox.showerror( 47 messagebox.showerror(
48 "eric6 Error", 48 "eric7 Error",
49 "PyQt could not be imported. Please make sure" 49 "PyQt could not be imported. Please make sure"
50 " it is installed and accessible.") 50 " it is installed and accessible.")
51 sys.exit(100) 51 sys.exit(100)
52 52
53 with contextlib.suppress(ImportError): 53 with contextlib.suppress(ImportError):
145 145
146 if len(sys.argv) > 1: 146 if len(sys.argv) > 1:
147 client.processArgs(sys.argv[1:]) 147 client.processArgs(sys.argv[1:])
148 sys.exit(0) 148 sys.exit(0)
149 elif res < 0: 149 elif res < 0:
150 print("eric6: {0}".format(client.errstr())) 150 print("eric7: {0}".format(client.errstr()))
151 # __IGNORE_WARNING_M801__ 151 # __IGNORE_WARNING_M801__
152 sys.exit(res) 152 sys.exit(res)
153 153
154 154
155 def excepthook(excType, excValue, tracebackobj): 155 def excepthook(excType, excValue, tracebackobj):
163 from UI.Info import BugAddress 163 from UI.Info import BugAddress
164 import Utilities 164 import Utilities
165 import Globals 165 import Globals
166 166
167 separator = '-' * 80 167 separator = '-' * 80
168 logFile = os.path.join(Globals.getConfigDir(), "eric6_error.log") 168 logFile = os.path.join(Globals.getConfigDir(), "eric7_error.log")
169 notice = ( 169 notice = (
170 """An unhandled exception occurred. Please report the problem\n""" 170 """An unhandled exception occurred. Please report the problem\n"""
171 """using the error reporting dialog or via email to <{0}>.\n""" 171 """using the error reporting dialog or via email to <{0}>.\n"""
172 """A log has been written to "{1}".\n\nError information:\n""".format( 172 """A log has been written to "{1}".\n\nError information:\n""".format(
173 BugAddress, logFile) 173 BugAddress, logFile)
246 global app, args, mainWindow, splash, restartArgs, inMainLoop 246 global app, args, mainWindow, splash, restartArgs, inMainLoop
247 247
248 sys.excepthook = excepthook 248 sys.excepthook = excepthook
249 249
250 from PyQt5.QtGui import QGuiApplication 250 from PyQt5.QtGui import QGuiApplication
251 QGuiApplication.setDesktopFileName("eric6.desktop") 251 QGuiApplication.setDesktopFileName("eric7.desktop")
252 252
253 options = [ 253 options = [
254 ("--config=configDir", 254 ("--config=configDir",
255 "use the given directory as the one containing the config files"), 255 "use the given directory as the one containing the config files"),
256 ("--debug", "activate debugging output to the console"), 256 ("--debug", "activate debugging output to the console"),
384 384
385 # Initialize SSL stuff 385 # Initialize SSL stuff
386 from E5Network.E5SslUtilities import initSSL 386 from E5Network.E5SslUtilities import initSSL
387 initSSL() 387 initSSL()
388 388
389 splash.showMessage(QCoreApplication.translate("eric6", "Starting...")) 389 splash.showMessage(QCoreApplication.translate("eric7", "Starting..."))
390 # We can only import these after creating the E5Application because they 390 # We can only import these after creating the E5Application because they
391 # make Qt calls that need the E5Application to exist. 391 # make Qt calls that need the E5Application to exist.
392 from UI.UserInterface import UserInterface 392 from UI.UserInterface import UserInterface
393 393
394 splash.showMessage( 394 splash.showMessage(
395 QCoreApplication.translate("eric6", "Generating Main Window...")) 395 QCoreApplication.translate("eric7", "Generating Main Window..."))
396 mainWindow = UserInterface(app, loc, splash, pluginFile, disabledPlugins, 396 mainWindow = UserInterface(app, loc, splash, pluginFile, disabledPlugins,
397 noopen, nocrash, disablecrash, restartArgs, 397 noopen, nocrash, disablecrash, restartArgs,
398 originalPathString) 398 originalPathString)
399 app.lastWindowClosed.connect(app.quit) 399 app.lastWindowClosed.connect(app.quit)
400 mainWindow.show() 400 mainWindow.show()

eric ide

mercurial