Minor restructuring and fallback error even even tkInter is not installed.

This commit is contained in:
Cas Cremers 2012-04-24 12:34:42 +02:00
parent 755c4519c6
commit 626385821a
2 changed files with 10 additions and 4 deletions

View File

@ -125,7 +125,11 @@ def panic(text):
on the command line and reported using Tkinter.
"""
import Tkinter
try:
import Tkinter
except:
print text
sys.exit(-1)
print text

View File

@ -21,6 +21,8 @@
#---------------------------------------------------------------------------
""" Import externals """
import sys
#---------------------------------------------------------------------------
@ -29,9 +31,7 @@ from Gui import About,Preference,Mainwindow
from Scyther import Scyther,Misc
#---------------------------------------------------------------------------
""" Import externals """
import sys
# Try to get wxPython
try:
import wx
except ImportError:
@ -50,6 +50,8 @@ version number.
Note that you can still use the Scyther binaries in the 'Scyther' directory.
""")
#---------------------------------------------------------------------------
import os
from optparse import OptionParser, SUPPRESS_HELP
from subprocess import *