sys.exit(1)


if __name__ == "__main__":
    deco.setEncoding(sEncoding)
    sFile = None
    print sys.argv

    try:
        sPath = sys.argv[1]

        try:
            sFile = sys.argv[2]
            if not os.path.exists(sFile) and len(sys.argv) > 3:
                #maybe we have a space in the file name... :-( and it is a mess with windows and .bat
                if os.path.exists(sys.argv[2] + " " + sys.argv[3]):
                    sFile = sys.argv[2] + " " + sys.argv[3]
        except IndexError:
            pass
    except IndexError:
        sConfigFileName = "wxvisu.ini"
        #try to find da config.ini file
        sPath = lookForConfig(
            sConfigFileName,
            [".", os.path.dirname(os.path.abspath(sys.argv[0]))])

    MyFrame.setConfigFile(sPath)
    MyFrame.setEncoding(sEncoding)
    app = MyApp(0, sFile)
    app.MainLoop()