示例#1
0
            os_support.set_bkchem_private_dir(opts[i])
            del opts[i]
    if "-b" in opts:
        i = opts.index("-b")
        if len(opts) >= i:
            # Batch mode
            myapp.initialize_batch()
            myapp.process_batch(opts)
        sys.exit()
    else:
        # normal interactive mode
        files = opts
        # splash screen
        splash = Splash()
        splash.withdraw()
        splash.update_idletasks()
        width = splash.winfo_reqwidth()
        height = splash.winfo_reqheight()
        x = (myapp.winfo_screenwidth() - width) / 2 - myapp.winfo_vrootx()
        y = (myapp.winfo_screenheight() - height) / 3 - myapp.winfo_vrooty()
        if x < 0:
            x = 0
        if y < 0:
            y = 0
        geometry = '%dx%d+%d+%d' % (width, height, x, y)
        splash.geometry(geometry)
        splash.update_idletasks()
        splash.deiconify()
        myapp.update()

        # application initialization
示例#2
0
      
      # we are in batch mode
      #import time
      #t = time.time()
      myapp.initialize_batch()
      myapp.process_batch( opts)
      #print " %f ms" % (1000*(time.time()-t))
    sys.exit()
  else:
    # normal interactive mode
    files = opts
    # splash screen
    splash = Splash()
    splash.withdraw()
    #splash.overrideredirect( 1)
    splash.update_idletasks()
    width = splash.winfo_reqwidth()
    height = splash.winfo_reqheight()
    x = (myapp.winfo_screenwidth() - width) / 2 - myapp.winfo_vrootx()
    y = (myapp.winfo_screenheight() - height) / 3 - myapp.winfo_vrooty()
    if x < 0:
        x = 0
    if y < 0:
        y = 0
    geometry = '%dx%d+%d+%d' % (width, height, x, y)
    splash.geometry(geometry)
    splash.update_idletasks()
    splash.deiconify()
    myapp.update()

    # application initialization