More helpful info messages.

pull/32/head
Christian Jacobs 2015-04-14 22:09:53 +01:00
rodzic 2c5b7d9c55
commit 1fdfc428a7
2 zmienionych plików z 11 dodań i 11 usunięć

Wyświetl plik

@ -30,8 +30,9 @@ pyqso_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), os.pardir
sys.path.insert(0, pyqso_path)
import logging
logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=logging.INFO)
logging.info("PyQSO development version.")
# PyQSO modules
from pyqso.adif import *
from pyqso.logbook import *
@ -39,7 +40,7 @@ from pyqso.menu import *
from pyqso.toolbar import *
from pyqso.toolbox import *
from pyqso.preferences_dialog import *
class PyQSO(Gtk.Window):
""" The PyQSO application class. """

Wyświetl plik

@ -22,18 +22,17 @@ import logging
from datetime import datetime
try:
import numpy
logging.debug("Using version %s of numpy." % (numpy.__version__))
logging.info("Using version %s of numpy." % (numpy.__version__))
import matplotlib
logging.debug("Using version %s of matplotlib." % (matplotlib.__version__))
logging.info("Using version %s of matplotlib." % (matplotlib.__version__))
matplotlib.use('Agg')
matplotlib.rcParams['font.size'] = 10.0
from mpl_toolkits.basemap import Basemap
logging.debug("Basemap imported from mpl_toolkits.basemap.")
import mpl_toolkits.basemap
logging.info("Using version %s of mpl_toolkits.basemap." % (mpl_toolkits.basemap.__version__))
from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
logging.debug("FigureCanvasGTK3Agg imported from matplotlib.backends.")
have_necessary_modules = True
logging.debug("All dependencies satisfied for the GreyLine class.")
except ImportError:
except ImportError as e:
logging.warning(e)
logging.warning("Could not import a non-standard Python module needed by the GreyLine class, or the version of the non-standard module is too old. Check that all the PyQSO dependencies are satisfied.")
have_necessary_modules = False
@ -73,7 +72,7 @@ class GreyLine(Gtk.VBox):
# Draw the map of the world. This is based on the example from:
# http://matplotlib.org/basemap/users/examples.html
m = Basemap(projection='mill', lon_0=0, ax=sub, resolution='c', fix_aspect=False)
m = mpl_toolkits.basemap.Basemap(projection='mill', lon_0=0, ax=sub, resolution='c', fix_aspect=False)
m.drawcountries(linewidth=0.5)
m.drawcoastlines(linewidth=0.5)
m.drawparallels(numpy.arange(-90, 90, 30), labels=[1, 0, 0, 0])