def excepthook(type, value, tb): msg = '\n' + '=' * 80 msg += '\nUncaught exception:\n' msg += ''.join(traceback.format_exception(type, value, tb)) msg += '=' * 80 + '\n' log(msg) tkinter_error.tkinter_error(msg) sys.exit(1)
def excepthook(type, value, tb): msg = "\n" + "=" * 80 msg += "\nUncaught exception:\n" msg += "".join(traceback.format_exception(type, value, tb)) msg += "=" * 80 + "\n" log(msg) tkinter_error.tkinter_error(msg) sys.exit(1)
""" Program to test image map-relative and view-relative placement. Select which to show and experiment with placement parameters. Usage: test_image_placement.py [-h|--help] [-d] [(-t|--tiles) (GMT|OSM)] """ import os import pyslip.tkinter_error as tkinter_error try: import wx except ImportError: msg = 'Sorry, you must install wxPython' tkinter_error.tkinter_error(msg) # If we have log.py, well and good. Otherwise ... try: import pyslip.log as log log = log.Log('pyslip.log', log.Log.DEBUG) except ImportError: def log(*args, **kwargs): pass import pyslip ###### # Various demo constants ######
#!/usr/bin/env python # -*- coding= utf-8 -*- """ Program to test polyline map-relative and view-relative placement. Select what to show and experiment with placement parameters. Usage: test_polyline_placement.py [-h|--help] [-d] [(-t|--tiles) (GMT|OSM)] """ import os import pyslip.tkinter_error as tkinter_error try: import wx except ImportError: msg = 'Sorry, you must install wxPython' tkinter_error.tkinter_error(msg) import pyslip import pyslip.log as log ###### # Various demo constants ###### # demo name/version DemoName = 'Test polyline placement, pySlip %s' % pyslip.__version__ DemoVersion = '1.0' # initial values InitialViewLevel = 4 InitialViewPosition = (145.0, -20.0)