'''
 ====================================================================
 Copyright (c) 2003-2006 Barry A Scott.  All rights reserved.

 This software is licensed as described in the file LICENSE.txt,
 which you should have received as part of this distribution.

 ====================================================================


    wb_diff_main.py

'''

VERSION_STRING = "Uncontrolled"

import sys

# make sure that we get 2.6 and not an earlier version
if not hasattr(sys, 'frozen'):
    import wxversion
    wxversion.select('2.6')

import wx
import wb_diff_frame
import wb_preferences


class WbDiffApp:
    def __init__( self ):
        self.log = self
        self.prefs = wb_preferences.Preferences( self )

    def info( self, *arg ):
        pass

        
def main():
    if len(sys.argv) < 3:
        print 'Usages: wb_diff file1 file2'
        return 1

    file1 = sys.argv[1]
    file2 = sys.argv[2]

    diff_app = WbDiffApp()
    app = wx.PySimpleApp()
    frame = wb_diff_frame.DiffFrame( diff_app, None, file1, file1, file2, file2 )

    frame.Show( True )
    app.MainLoop()
    return 0

if __name__ == '__main__':
    main()
