コード例 #1
0
ファイル: fs2xp.py プロジェクト: GCTMODS/FS2XPlane
        for (uid,(mdlformat, bglname, bglname, off, rcsize, name, scale)) in output.libobj.iteritems():
            output.debug.write("%s\t%s\t%s\n" % (uid, name, bglname[len(lbpath):]))
        raise IOError
    if prof:
        from profile import run
        run('output.process()', join(xppath,'profile.dmp'))
    else:
        output.process()
    output.proclibs()
    output.procphotos()
    output.export()
    if output.debug:
        output.debug.close()
    elif exists(logname):
        status(-1, 'Displaying summary "%s"' % logname)
        viewer(logname)
    status(-1, 'Done.')

except FS2XError, e:
    if __debug__: print_exc()
    exit('Error:\t%s\n' % e.msg)

except:
    status(-1, 'Internal error')
    print_exc()
    if not debug:
        if not isdir(dirname(logname)):
            mkdir(dirname(logname))
        logfile=file(logname, 'at')
        logfile.write('\nInternal error\n')
        print_exc(None, logfile)
コード例 #2
0
 def onHelp(self, evt):
     viewer(join(curdir,'Resources',appname+'.html'))
コード例 #3
0
ファイル: fs2xp.py プロジェクト: whiteblackitty/FS2XPlane
            output.debug.write("%s\t%s\t%s\n" %
                               (uid, name, bglname[len(lbpath):]))
        raise IOError
    if prof:
        from profile import run
        run('output.process()', join(xppath, 'profile.dmp'))
    else:
        output.process()
    output.proclibs()
    output.procphotos()
    output.export()
    if output.debug:
        output.debug.close()
    elif exists(logname):
        status(-1, 'Displaying summary "%s"' % logname)
        viewer(logname)
    status(-1, 'Done.')

except FS2XError, e:
    if __debug__: print_exc()
    exit('Error:\t%s\n' % e.msg)

except:
    status(-1, 'Internal error')
    print_exc()
    if not debug:
        if not isdir(dirname(logname)):
            mkdir(dirname(logname))
        logfile = file(logname, 'at')
        logfile.write('\nInternal error\n')
        print_exc(None, logfile)
コード例 #4
0
            return

        try:
            output=Output(fspath, lbpath, xppath, dumplib, season, xpver,
                          status,log,refresh, False)
            output.scanlibs()
            output.process()
            output.proclibs()
            output.procphotos()
            output.export()
            if self.progress:
                self.progress.Destroy()
                self.progress=None
            if output.debug: output.debug.close()
            if exists(self.logname):
                viewer(self.logname)
                myMessageBox('Displaying summary\n"%s"' %(
                    self.logname), 'Done.', wx.ICON_INFORMATION|wx.OK, self)
            else:
                myMessageBox('', 'Done.', wx.ICON_INFORMATION|wx.OK, self)

        except FS2XError, e:
            if exists(self.logname):
                logfile=file(self.logname, 'at')
                logfile.write('%s\n' % e.msg.encode("latin1",'replace'))
                logfile.close()
            myMessageBox(e.msg, 'Error during conversion.', wx.ICON_ERROR|wx.OK, self)

        except:
            logfile=file(self.logname, 'at')
            logfile.write('\nInternal error\n')