
if __name__ == '__main__':
    import wx
    from controller import ViewerController
    app = wx.App(0)
    ViewerController()
    app.MainLoop()


if __name__ == '__main__':
    import sys
    try:
        import wx
    except ImportError:
        print("""\
You need to install WXPython to use the viewer

http://wxpython.org/download.php
""")
        sys.exit()
    from controller import ViewerController
    app = wx.App(0)
    ViewerController()
    app.MainLoop()

Add simple test for whether WX is installed. Display download link if not.
Add simple test for whether WX is installed. Display download link if not.

  
  if __name__ == '__main__':
+     import sys
+     try:
-     import wx
+         import wx
+     except ImportError:
+         print("""\
+ You need to install WXPython to use the viewer
+ 
+ http://wxpython.org/download.php
+ """)
+         sys.exit()
      from controller import ViewerController
      app = wx.App(0)
      ViewerController()
      app.MainLoop()
  
Add simple test for whether WX is installed. Display download link if not.
## Code Before:

if __name__ == '__main__':
    import wx
    from controller import ViewerController
    app = wx.App(0)
    ViewerController()
    app.MainLoop()

## Instruction:
Add simple test for whether WX is installed. Display download link if not.
## Code After:

if __name__ == '__main__':
    import sys
    try:
        import wx
    except ImportError:
        print("""\
You need to install WXPython to use the viewer

http://wxpython.org/download.php
""")
        sys.exit()
    from controller import ViewerController
    app = wx.App(0)
    ViewerController()
    app.MainLoop()
